-
+ 691FCC41DD8CA5AA1793D8BC1233CDDF8BFBB10DF0C9B83C1E76E9F0B4098F780AADA7F84938A76587CA97C6B6A13F34607AB2E24372AA67938B660A57EC6611
bitcoin/src/test/README
(0 . 0)(1 . 52)
22851 /****************************\
22852 * EXPERIMENTAL BRANCH. *
22853 * FOR LABORATORY USE ONLY. *
22854 ********************************
22855 ************
22856 **************
22857 ****************
22858 **** **** ****
22859 *** *** ***
22860 *** *** ***
22861 *** * * **
22862 ******** ********
22863 ******* ******
22864 *** **
22865 * ******* **
22866 ** * * * * *
22867 ** * * ***
22868 **** * * * * ****
22869 **** *** * * ** ***
22870 **** ********* ******
22871 ******* ***** *******
22872 ********* ****** **
22873 ** ****** ******
22874 ** ******* **
22875 ** ******* ***
22876 **** ******** ************
22877 ************ ************
22878 ******** *******
22879 ****** ****
22880 *** ***
22881 ********************************
22882 The sources in this directory are unit test cases. Boost includes a
22883 unit testing framework, and since bitcoin already uses boost, it makes
22884 sense to simply use this framework rather than require developers to
22885 configure some other framework (we want as few impediments to creating
22886 unit tests as possible).
22887
22888 The build system is setup to compile an executable called "test_bitcoin"
22889 that runs all of the unit tests. The main source file is called
22890 test_bitcoin.cpp, which simply includes other files that contain the
22891 actual unit tests (outside of a couple required preprocessor
22892 directives). The pattern is to create one test file for each class or
22893 source file for which you want to create unit tests. The file naming
22894 convention is "<source_filename>_tests.cpp" and such files should wrap
22895 their tests in a test suite called "<source_filename>_tests". For an
22896 examples of this pattern, examine uint160_tests.cpp and
22897 uint256_tests.cpp.
22898
22899 For further reading, I found the following website to be helpful in
22900 explaining how the boost unit test framework works:
22901
22902 http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/