zcash-patched-for-explorer/src/test
Jack Grigg 6fb8d0c2d6
Skip JoinSplit verification before the last checkpoint
Part of #1749
2016-12-09 21:06:45 +13:00
..
data Add tests for witness `element` and tree `last` methods. Strengthen testing by inserting a different commitment into the tree at each step. 2016-11-14 10:13:06 -07:00
Checkpoints_tests.cpp Remove the mainnet checkpoints. 2016-06-29 14:21:03 -06:00
DoS_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
Makefile
README.md Clarification of unit test build instructions. 2015-10-14 08:21:55 +00:00
accounting_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
addrman_tests.cpp Increase test coverage for addrman and addrinfo 2016-05-24 12:55:33 -07:00
alert_tests.cpp Rename client identifier from Satoshi to MagicBean (closes #1481) 2016-10-12 10:50:05 -07:00
allocator_tests.cpp allocators: split allocators and pagelocker 2015-03-20 12:23:44 +01:00
arith_uint256_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
base32_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
base58_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
base64_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
bctest.py Remove references to X11 licence 2014-12-16 15:56:50 +08:00
bignum.h Assert that new OpenSSL allocators succeed 2016-09-29 17:58:29 +13:00
bip32_tests.cpp fix and enable bip32 unit test 2015-04-23 13:21:05 +02:00
bitcoin-util-test.py Remove references to X11 licence 2014-12-16 15:56:50 +08:00
bloom_tests.cpp Remove #1144 from bloom_tests by reverting to commit 5012190. 2016-09-07 15:12:09 -07:00
buildenv.py.in
checkblock_tests.cpp Skip JoinSplit verification before the last checkpoint 2016-12-09 21:06:45 +13:00
coins_tests.cpp Regression test. 2016-12-06 12:54:53 -07:00
compress_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
crypto_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
equihash_tests.cpp Store the Equihash solution in minimal representation in the block header 2016-08-16 16:02:39 +12:00
getarg_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
hash_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
key_tests.cpp Re-encode hard-coded addresses in tests 2016-10-03 23:53:14 -07:00
main_tests.cpp Update tests to account for decreased block interval 2016-06-10 12:02:47 +12:00
mempool_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
miner_tests.cpp Update tests for new genesis blocks 2016-10-28 02:56:15 -07:00
mruset_tests.cpp Better mruset unit test 2015-04-30 08:16:30 -07:00
multisig_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
netbase_tests.cpp add unit test for CNetAddr::GetGroup. 2015-09-22 00:43:14 +00:00
pmt_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
policyestimator_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
pow_tests.cpp Update tests for new genesis blocks 2016-10-28 02:56:15 -07:00
reverselock_tests.cpp Replace boost::reverse_lock with our own. 2015-09-22 00:43:13 +00:00
rpc_tests.cpp Update tests for account deprecation 2016-10-10 10:47:30 -05:00
rpc_wallet_tests.cpp Closes #1903. Add fee parameter to z_sendmany. 2016-11-30 14:23:35 -08:00
sanity_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
scheduler_tests.cpp More robust CScheduler unit test 2015-05-16 17:59:23 -04:00
script_P2SH_tests.cpp Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
script_tests.cpp Rename libbitcoinconsensus to libzcashconsensus 2016-10-18 16:45:37 -05:00
scriptnum_tests.cpp Make CScriptNum() take nMaxNumSize as an argument 2015-10-08 17:46:55 +02:00
serialize_tests.cpp New implementation of incremental merkle tree 2016-04-28 16:07:52 -06:00
sha256compress_tests.cpp Remove unused code in libzerocash util.cpp 2016-05-18 11:22:29 -06:00
sighash_tests.cpp Update sighash tests for new consensus rule 2016-10-22 11:09:07 -05:00
sigopcount_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
skiplist_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
test_bitcoin.cpp Deallocate the public parameters during Shutdown. 2016-08-26 16:55:43 -06:00
test_bitcoin.h tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
timedata_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
transaction_tests.cpp Skip JoinSplit verification before the last checkpoint 2016-12-09 21:06:45 +13:00
uint256_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
univalue_tests.cpp tests: add a BasicTestingSetup and apply to all tests 2015-03-12 09:45:22 +01:00
util_tests.cpp Repair FormatSubVersion tests. refs #1138 2016-10-02 16:44:56 +01:00

README.md

Notes

The sources in this directory are unit test cases. Boost includes a unit testing framework, and since bitcoin already uses boost, it makes sense to simply use this framework rather than require developers to configure some other framework (we want as few impediments to creating unit tests as possible).

The build system is setup to compile an executable called "test_bitcoin" that runs all of the unit tests. The main source file is called test_bitcoin.cpp, which simply includes other files that contain the actual unit tests (outside of a couple required preprocessor directives). The pattern is to create one test file for each class or source file for which you want to create unit tests. The file naming convention is "<source_filename>_tests.cpp" and such files should wrap their tests in a test suite called "<source_filename>_tests". For an examples of this pattern, examine uint160_tests.cpp and uint256_tests.cpp.

Add the source files to /src/Makefile.test.include to add them to the build.

For further reading, I found the following website to be helpful in explaining how the boost unit test framework works: http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/.