doc: Add documentation for new test/lib

This commit is contained in:
MarcoFalke 2019-11-05 15:55:49 -05:00
parent faec28252c
commit fa4c6fa9b1
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548
2 changed files with 13 additions and 2 deletions

View File

@ -7,8 +7,8 @@ configure some other framework (we want as few impediments to creating
unit tests as possible).
The build system is set up to compile an executable called `test_bitcoin`
that runs all of the unit tests. The main source file is called
`setup_common.cpp`.
that runs all of the unit tests. The main source file for the test library is found in
`util/setup_common.cpp`.
### Compiling/running unit tests

11
src/test/util/README.md Normal file
View File

@ -0,0 +1,11 @@
# Test library
This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui
tests).
Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or
(when in doubt) a new module should be created.
The utilities in here are compiled into a library, which does not hold any state. However, the main file `setup_common`
defines the common test setup for all test binaries. The test binaries will handle the global state when they
instantiate the `BasicTestingSetup` (or one of its derived classes).