Changeset View
Changeset View
Standalone View
Standalone View
src/test/README.md
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
unit tests. The file naming convention is `<source_filename>_tests.cpp` | unit tests. The file naming convention is `<source_filename>_tests.cpp` | ||||
and such files should wrap their tests in a test suite | and such files should wrap their tests in a test suite | ||||
called `<source_filename>_tests`. For an example of this pattern, | called `<source_filename>_tests`. For an example of this pattern, | ||||
examine `uint256_tests.cpp`. | examine `uint256_tests.cpp`. | ||||
For further reading, I found the following website to be helpful in | For further reading, I found the following website to be helpful in | ||||
explaining how the boost unit test framework works: | explaining how the boost unit test framework works: | ||||
[http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/). | [http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/). | ||||
### bitcoin-util-test.py | |||||
The test directory also contains the bitcoin-util-test.py tool, which tests bitcoin utils (currently just bitcoin-tx). This test gets run automatically during the `make check` build process. It is also possible to run the test manually from the src directory: | |||||
``` | |||||
test/bitcoin-util-test.py --srcdir=[current directory] | |||||
``` |