2014-01-29 02:24:52 +01:00
|
|
|
Compiling/running darkcoind unit tests
|
2012-06-15 02:44:04 +02:00
|
|
|
------------------------------------
|
|
|
|
|
2014-01-29 02:24:52 +01:00
|
|
|
darkcoind unit tests are in the `src/test/` directory; they
|
2012-06-15 02:44:04 +02:00
|
|
|
use the Boost::Test unit-testing framework.
|
|
|
|
|
|
|
|
To compile and run the tests:
|
2013-05-20 06:30:00 +02:00
|
|
|
|
|
|
|
cd src
|
2014-07-09 20:48:35 +02:00
|
|
|
make -f makefile.unix test_darkcoin UNIT_TEST=1 # Replace makefile.unix if you're not on unix
|
2014-01-29 02:24:52 +01:00
|
|
|
./test_darkcoin # Runs the unit tests
|
2012-06-15 02:44:04 +02:00
|
|
|
|
|
|
|
If all tests succeed the last line of output will be:
|
2013-05-20 06:30:00 +02:00
|
|
|
`*** No errors detected`
|
2012-06-15 02:44:04 +02:00
|
|
|
|
2013-05-20 06:30:00 +02:00
|
|
|
To add more tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
|
2012-06-15 02:44:04 +02:00
|
|
|
.cpp files in the test/ directory or add new .cpp files that
|
2012-07-26 05:25:26 +02:00
|
|
|
implement new BOOST_AUTO_TEST_SUITE sections (the makefiles are
|
2014-01-29 02:24:52 +01:00
|
|
|
set up to add test/*.cpp to test_darkcoin automatically).
|
2012-06-15 02:44:04 +02:00
|
|
|
|
|
|
|
|
2014-01-29 02:24:52 +01:00
|
|
|
Compiling/running DarkCoin-Qt unit tests
|
2012-06-15 02:44:04 +02:00
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
Bitcoin-Qt unit tests are in the src/qt/test/ directory; they
|
|
|
|
use the Qt unit-testing framework.
|
|
|
|
|
|
|
|
To compile and run the tests:
|
|
|
|
|
2013-05-20 06:30:00 +02:00
|
|
|
qmake bitcoin-qt.pro BITCOIN_QT_TEST=1
|
|
|
|
make
|
2014-01-29 02:24:52 +01:00
|
|
|
./darkcoin-qt_test
|
2013-05-20 06:30:00 +02:00
|
|
|
|
|
|
|
To add more tests, add them to the `src/qt/test/` directory,
|
|
|
|
the `src/qt/test/test_main.cpp` file, and bitcoin-qt.pro.
|