Back to home page

Bitcoin sources

 
 

    


Last indexation completed on 2020-06-26 13:35:05 UTC

 
  Name Size Date (UTC) Last indexed Description
  Name Size Date (UTC) Last indexed Description
folder Parent directory - 2020-06-25 13:32:28  
folder json/ - 2020-06-25 13:32:28  
folder obj-test/ - 2020-06-25 13:32:28  
folder obj/ - 2020-06-25 13:32:28  
folder test/ - 2020-06-25 13:32:28

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

base58.h 8863 bytes 2020-06-25 13:32:28 2020-06-25 15:50:17  
bignum.h 14823 bytes 2020-06-25 13:32:28 2020-06-25 15:43:40  
bitcoinrpc.cpp 84878 bytes 2020-06-25 13:32:28 2020-06-25 15:50:33  
bitcoinrpc.h 310 bytes 2020-06-25 13:32:28 2020-06-25 15:44:05  
checkpoints.cpp 2469 bytes 2020-06-25 13:32:28 2020-06-25 15:44:06  
checkpoints.h 845 bytes 2020-06-25 13:32:28 2020-06-25 15:44:06  
crypter.cpp 4518 bytes 2020-06-25 13:32:28 2020-06-25 15:44:07  
crypter.h 3178 bytes 2020-06-25 13:32:28 2020-06-25 15:44:08  
db.cpp 33071 bytes 2020-06-25 13:32:28 2020-06-25 15:50:39  
db.h 12648 bytes 2020-06-25 13:32:28 2020-06-25 15:44:20  
headers.h 1494 bytes 2020-06-25 13:32:28 2020-06-25 15:44:21  
init.cpp 16333 bytes 2020-06-25 13:32:28 2020-06-25 15:50:41  
init.h 425 bytes 2020-06-25 13:32:28 2020-06-25 15:44:24  
key.h 13800 bytes 2020-06-25 13:32:28 2020-06-25 15:50:44  
keystore.cpp 5273 bytes 2020-06-25 13:32:28 2020-06-25 15:50:45  
keystore.h 3896 bytes 2020-06-25 13:32:28 2020-06-25 15:50:46  
knobs.h 150 bytes 2020-06-25 13:32:28 2020-06-25 15:44:30

ifndef

main.cpp 98106 bytes 2020-06-25 13:32:28 2020-06-25 15:51:44  
main.h 34487 bytes 2020-06-25 13:32:28 2020-06-25 15:48:15  
makefile.unix 4087 bytes 2020-06-25 13:32:28 2020-06-25 15:45:03  
net.cpp 41870 bytes 2020-06-25 13:32:28 2020-06-25 15:49:59  
net.h 19069 bytes 2020-06-25 13:32:28 2020-06-25 15:50:05  
noui.h 2441 bytes 2020-06-25 13:32:28 2020-06-25 15:45:21  
protocol.cpp 7696 bytes 2020-06-25 13:32:28 2020-06-25 15:48:18  
protocol.h 4132 bytes 2020-06-25 13:32:28 2020-06-25 15:45:24  
script.cpp 39360 bytes 2020-06-25 13:32:28 2020-06-25 15:45:36  
script.h 20091 bytes 2020-06-25 13:32:28 2020-06-25 15:45:43  
serialize.h 45898 bytes 2020-06-25 13:32:28 2020-06-25 15:46:01  
strlcpy.h 2501 bytes 2020-06-25 13:32:28 2020-06-25 15:46:01  
uint256.h 24439 bytes 2020-06-25 13:32:28 2020-06-25 15:46:12  
util.cpp 27856 bytes 2020-06-25 13:32:28 2020-06-25 15:48:43  
util.h 17795 bytes 2020-06-25 13:32:28 2020-06-25 15:46:28  
wallet.cpp 46322 bytes 2020-06-25 13:32:28 2020-06-25 15:51:15  
wallet.h 18448 bytes 2020-06-25 13:32:28 2020-06-25 15:51:20