Back to home page

Bitcoin sources

 
 

    


 
  Name Size Date (UTC) Last indexed Description
  Name Size Date (UTC) Last indexed Description
folder Parent directory - 2015-03-19 23:07:58  
folder json/ - 2015-01-29 00:06:00  
folder obj-test/ - 2015-01-29 00:06:00  
folder obj/ - 2015-01-29 00:06:00  
folder test/ - 2015-01-29 00:06:00

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 2015-01-29 00:06:00 2015-03-19 23:20:33  
bignum.h 14823 bytes 2015-01-29 00:06:00 2015-03-19 23:20:33  
bitcoinrpc.cpp 82812 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
bitcoinrpc.h 310 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
checkpoints.cpp 2604 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
checkpoints.h 845 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
crypter.cpp 4518 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
crypter.h 3178 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
db.cpp 33001 bytes 2015-01-29 00:06:00 2015-03-19 23:20:34  
db.h 12648 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
headers.h 1494 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
init.cpp 15775 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
init.h 425 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
irc.cpp 11531 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
irc.h 432 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
key.h 12660 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
keystore.cpp 5273 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
keystore.h 3896 bytes 2015-01-29 00:06:00 2015-03-19 23:20:35  
main.cpp 104389 bytes 2015-01-29 00:06:00 2015-03-19 23:20:37  
main.h 34550 bytes 2015-01-29 00:06:00 2015-03-19 23:20:37  
makefile.unix 4102 bytes 2015-01-29 00:06:00 2015-03-19 23:20:37  
net.cpp 57900 bytes 2015-01-29 00:06:00 2015-03-19 23:20:38  
net.h 19150 bytes 2015-01-29 00:06:00 2015-03-19 23:20:38  
noui.h 2441 bytes 2015-01-29 00:06:00 2015-03-19 23:20:38  
protocol.cpp 7874 bytes 2015-01-29 00:06:00 2015-03-19 23:20:38  
protocol.h 4305 bytes 2015-01-29 00:06:00 2015-03-19 23:20:39  
script.cpp 39360 bytes 2015-01-29 00:06:00 2015-03-19 23:20:39  
script.h 20091 bytes 2015-01-29 00:06:00 2015-03-19 23:20:39  
serialize.h 45968 bytes 2015-01-29 00:06:00 2015-03-19 23:20:40  
strlcpy.h 2501 bytes 2015-01-29 00:06:00 2015-03-19 23:20:40  
uint256.h 24439 bytes 2015-01-29 00:06:00 2015-03-19 23:20:41  
util.cpp 27811 bytes 2015-01-29 00:06:00 2015-03-19 23:20:41  
util.h 17609 bytes 2015-01-29 00:06:00 2015-03-19 23:20:42  
wallet.cpp 46322 bytes 2015-01-29 00:06:00 2015-03-19 23:20:42  
wallet.h 18448 bytes 2015-01-29 00:06:00 2015-03-19 23:20:43