aboutsummaryrefslogtreecommitdiff
path: root/src/test/bignum_tests.cpp
AgeCommit message (Collapse)Author
2014-01-19Adds additional zero checks for setCompactNoel Tiernan
These encoded values should all decode to zero Positive Numbers 0x01003456 (1 byte 0x00) 0x02000056 (2 bytes 0x0000) 0x03000000 (3 bytes 0x000000) 0x04000000 (4 bytes 0x000000_00) Negative Numbers 0x00923456 -(0 bytes, so zero) 0x01803456 -(1 byte 0x00) 0x02800056 -(2 bytes 0x0000) 0x03800000 -(3 bytes 0x000000) 0x04800000 -(4 bytes 0x000000_00)
2013-11-10Cleanup code using forward declarations.Brandon Dahler
Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
2013-10-27Make util phexdigit array reusableOlivier Langlois
class template base_uint had its own private lookup table. This is saving 256 bytes per instantiation. The result is not spectacular as bitcoin-qt has only shrinked of about 1Kb but it is still valid improvement. Also, I have replaced a for loop with a memset() call. Made CBigNum::SetHex() use the new HexDigit() function. Signed-off-by: Olivier Langlois <olivier@olivierlanglois.net>
2013-04-03Fix signed/unsigned comparison warningsGavin Andresen
2012-09-15tests for SetCompact and GetCompact of CBigNumChristian von Roques
2012-08-02fix further spelling errors / remove a tab in the sourcePhilip Kaufmann
2012-06-07Move NOINLINE definition to test where it's used.Ricardo M. Correia
2012-05-31Use C++-style numeric limits instead of C-style.Ricardo M. Correia
2012-05-31Fix noinline definition so that it works for more compilers.Ricardo M. Correia
2012-05-14Add test case for CBigNum::setint64().Ricardo M. Correia
One of the test cases currently aborts when using gcc's flag -ftrapv, due to negating an INT64_MIN int64 variable, which is an undefined operation. This will be fixed in a subsequent commit.