raw
genesis                 1 The sources in this directory are unit test cases.  Boost includes a
genesis 2 unit testing framework, and since bitcoin already uses boost, it makes
genesis 3 sense to simply use this framework rather than require developers to
genesis 4 configure some other framework (we want as few impediments to creating
genesis 5 unit tests as possible).
genesis 6
genesis 7 The build system is setup to compile an executable called "test_bitcoin"
genesis 8 that runs all of the unit tests. The main source file is called
genesis 9 test_bitcoin.cpp, which simply includes other files that contain the
genesis 10 actual unit tests (outside of a couple required preprocessor
genesis 11 directives). The pattern is to create one test file for each class or
genesis 12 source file for which you want to create unit tests. The file naming
genesis 13 convention is "<source_filename>_tests.cpp" and such files should wrap
genesis 14 their tests in a test suite called "<source_filename>_tests". For an
genesis 15 examples of this pattern, examine uint160_tests.cpp and
genesis 16 uint256_tests.cpp.
genesis 17
genesis 18 For further reading, I found the following website to be helpful in
genesis 19 explaining how the boost unit test framework works:
genesis 20
genesis 21 http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/