Back to home page

Bitcoin sources

 
 

    


Last indexation completed on 2020-06-26 13:35:19 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 9049 bytes 2020-06-25 13:32:28 2020-06-25 15:54:26  
bignum.h 14823 bytes 2020-06-25 13:32:28 2020-06-25 15:43:40  
bitcoinrpc.cpp 82812 bytes 2020-06-25 13:32:28 2020-06-25 15:54:42  
bitcoinrpc.h 310 bytes 2020-06-25 13:32:28 2020-06-25 15:44:05  
checkpoints.cpp 2604 bytes 2020-06-25 13:32:28 2020-06-25 15:54:42  
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 33052 bytes 2020-06-25 13:32:28 2020-06-25 15:54:49  
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 15775 bytes 2020-06-25 13:32:28 2020-06-25 15:54:51  
init.h 425 bytes 2020-06-25 13:32:28 2020-06-25 15:44:24  
irc.cpp 11531 bytes 2020-06-25 13:32:28 2020-06-25 15:54:53  
irc.h 432 bytes 2020-06-25 13:32:28 2020-06-25 15:54:53  
key.h 12660 bytes 2020-06-25 13:32:28 2020-06-25 15:51:55  
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  
main.cpp 104389 bytes 2020-06-25 13:32:28 2020-06-25 15:55:11  
main.h 34550 bytes 2020-06-25 13:32:28 2020-06-25 15:55:20  
makefile.unix 4102 bytes 2020-06-25 13:32:28 2020-06-25 15:55:20  
net.cpp 57900 bytes 2020-06-25 13:32:28 2020-06-25 15:55:30  
net.h 19150 bytes 2020-06-25 13:32:28 2020-06-25 15:55:34  
noui.h 2441 bytes 2020-06-25 13:32:28 2020-06-25 15:45:21  
protocol.cpp 7874 bytes 2020-06-25 13:32:28 2020-06-25 15:55:36  
protocol.h 4305 bytes 2020-06-25 13:32:28 2020-06-25 15:55:37  
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 45968 bytes 2020-06-25 13:32:28 2020-06-25 15:53:25  
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 27811 bytes 2020-06-25 13:32:28 2020-06-25 15:55:42  
util.h 17607 bytes 2020-06-25 13:32:28 2020-06-25 15:55:47  
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