aboutsummaryrefslogtreecommitdiff
path: root/src/test/uint256_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Get rid of nType and nVersionPieter Wuille2016-11-071-19/+19
| | | | | | | | | | | Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
* Make GetSerializeSize a wrapper on top of CSizeComputerPieter Wuille2016-11-071-4/+4
| | | | | | | | | | | Given that in default GetSerializeSize implementations created by ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid of the specialized GetSerializeSize methods everywhere, and just use CSizeComputer. This removes a lot of code which isn't actually used anywhere. For CCompactSize and CVarInt this actually removes a more efficient size computing algorithm, which is brought back in a later commit.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
* Add tests for new uint256Wladimir J. van der Laan2015-01-051-0/+268
|
* uint256->arith_uint256 blob256->uint256Wladimir J. van der Laan2015-01-051-837/+0
| | | | | Introduce new opaque implementation of `uint256`, move old "arithmetic" implementation to `arith_uint256.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* Move {Get,Set}Compact from bignum to uint256Pieter Wuille2014-05-091-0/+129
|
* Add multiplication and division to uint160/uint256Pieter Wuille2014-05-091-0/+71
|
* Exception instead of assigning 0 in case of wrong vector lengthPieter Wuille2014-05-091-5/+5
|
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-0/+4
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Unittests for uint256.hThomas Holenstein2013-12-251-15/+619
| | | | | | Unit tests for uint256.h. The file uint160_tests.cpp is no longer needed. The ad-hoc tests which were in uint256.h are also no longer needed. The new tests achieve 100% coverage.
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-3/+5
| | | | | | | | | 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.
* Make util phexdigit array reusableOlivier Langlois2013-10-271-0/+9
| | | | | | | | | | | | | | 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 <[email protected]>
* Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan2011-12-211-3/+1
| | | | This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
* Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr2011-12-201-1/+3
|
* Rework unit tests so test_bitcoin.cpp does not #include them allGavin Andresen2011-12-191-1/+1
|
* Cleanup test suite output to be more useful.Matt Corallo2011-08-081-1/+1
|
* Fix testing setupVegard Nossum2011-08-081-0/+2
| | | | | | | There were some problems with the existing testing setup: - Makefile rules for test-file compilation used CFLAGS instead of CXXFLAGS in makefile.unix
* Boost unit-testing framework.Gavin Andresen2011-06-271-0/+16
make -f makefile.{unix,osx,mingw} test_bitcoin to compile dumb, do-almost-nothing placeholder unit tests.