summaryrefslogtreecommitdiff
path: root/test/unit/t_balance.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix denominator of roundto resultMax Nikulin2024-08-051-0/+10
| | | | | | | | | | | | | | | | | | Multiprecision rational created from a double value may have large power of 2 denominator since fractional decimal numbers can not be represented as binary floating point numbers. It leads to failed assertion when result is compared to a value converted directly from strings. Use integer multiprecision arithmetics to round numbers to ensure proper denominator. Inspired by python gmpy2 package <https://github.com/aleaxit/gmpy/blob/3e4564ae9d/src/gmpy2_mpq_misc.c#L315> The change makes `roundto` symmetric for positive/negative arguments. Halves are rounded to nearest even. Rounded away from zero are discussed in #1663 and it may be achieved with minimal modification. - See #2329 - Closes #1983
* [tests] Fix compiler warningAlexis Hildebrandt2015-01-111-0/+3
|
* Revert "add unit test printing for balance_t" until issue is fixed.tripun2014-08-111-31/+0
| | | | | | Getting different output on system than travis-ci. This reverts commit 272e3cb3799937dcd3c379de56b299a3cbde52ca.
* add unit test printing for balance_ttripun2014-08-111-0/+31
|
* add unit test of Zero for balance_ttripun2014-08-111-0/+26
|
* add unit test Truth for balance_ttripun2014-08-111-0/+20
|
* add unit test Round for balance_ttripun2014-08-111-0/+50
|
* add unit test Floor for balance_ttripun2014-08-111-0/+43
|
* add unit test Ceiling for balance_ttripun2014-08-111-0/+43
|
* add unit test Absolute for balance_ttripun2014-08-111-0/+25
|
* add unit test negation for balance_ttripun2014-08-111-0/+35
|
* add unit test for balance divisiontripun2014-08-111-0/+45
|
* add test for multiplicationtripun2014-08-111-0/+45
|
* edited subraction testtripun2014-08-111-1/+1
|
* add Equality unit test for balancetripun2014-08-111-2/+65
|
* added boost subtraction unit testtripun2014-08-111-0/+39
|
* added balance addition unit testtripun2014-08-111-4/+42
|
* add balance Test constructorstripun2014-08-111-2/+22
|
* Fixed several unit testsJohn Wiegley2011-02-041-9/+9
|
* Use Boost.Test instead of CppUnitJohn Wiegley2011-02-041-20/+24
|
* Call times_initialize/shutdown in the unit testsJohn Wiegley2009-10-251-0/+2
|
* Enabled use of pre-compiled headers by defaultJohn Wiegley2009-03-101-0/+2
|
* Restored the use of Python unit testsJohn Wiegley2009-02-241-4/+0
|
* Fixed several unused value and param warningsJohn Wiegley2009-02-161-1/+0
|
* Unit test for Python are now auto-generated from the C++ tests.John Wiegley2009-01-281-0/+1
|
* Reorganized Ledger so that it builds as 7 separate libraries. This is mainlyJohn Wiegley2009-01-251-4/+8
| | | | to prove to myself that it has proper decoupling between prior code areas.
* Moved the test sources around, so that all the unit tests are in test/unit.John Wiegley2008-08-051-0/+25