experimental-genesis 1 /****************************\
experimental-genesis 2 * EXPERIMENTAL BRANCH. *
experimental-genesis 3 * FOR LABORATORY USE ONLY. *
experimental-genesis 4 ********************************
experimental-genesis 5 ************
experimental-genesis 6 **************
experimental-genesis 7 ****************
experimental-genesis 8 **** **** ****
experimental-genesis 9 *** *** ***
experimental-genesis 10 *** *** ***
experimental-genesis 11 *** * * **
experimental-genesis 12 ******** ********
experimental-genesis 13 ******* ******
experimental-genesis 14 *** **
experimental-genesis 15 * ******* **
experimental-genesis 16 ** * * * * *
experimental-genesis 17 ** * * ***
experimental-genesis 18 **** * * * * ****
experimental-genesis 19 **** *** * * ** ***
experimental-genesis 20 **** ********* ******
experimental-genesis 21 ******* ***** *******
experimental-genesis 22 ********* ****** **
experimental-genesis 23 ** ****** ******
experimental-genesis 24 ** ******* **
experimental-genesis 25 ** ******* ***
experimental-genesis 26 **** ******** ************
experimental-genesis 27 ************ ************
experimental-genesis 28 ******** *******
experimental-genesis 29 ****** ****
experimental-genesis 30 *** ***
experimental-genesis 31 ********************************
experimental-genesis 32 The sources in this directory are unit test cases. Boost includes a
experimental-genesis 33 unit testing framework, and since bitcoin already uses boost, it makes
experimental-genesis 34 sense to simply use this framework rather than require developers to
experimental-genesis 35 configure some other framework (we want as few impediments to creating
experimental-genesis 36 unit tests as possible).
experimental-genesis 37
experimental-genesis 38 The build system is setup to compile an executable called "test_bitcoin"
experimental-genesis 39 that runs all of the unit tests. The main source file is called
experimental-genesis 40 test_bitcoin.cpp, which simply includes other files that contain the
experimental-genesis 41 actual unit tests (outside of a couple required preprocessor
experimental-genesis 42 directives). The pattern is to create one test file for each class or
experimental-genesis 43 source file for which you want to create unit tests. The file naming
experimental-genesis 44 convention is "<source_filename>_tests.cpp" and such files should wrap
experimental-genesis 45 their tests in a test suite called "<source_filename>_tests". For an
experimental-genesis 46 examples of this pattern, examine uint160_tests.cpp and
experimental-genesis 47 uint256_tests.cpp.
experimental-genesis 48
experimental-genesis 49 For further reading, I found the following website to be helpful in
experimental-genesis 50 explaining how the boost unit test framework works:
experimental-genesis 51
experimental-genesis 52 http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/