aboutsummaryrefslogtreecommitdiff
path: root/doc/unit-tests.md
diff options
context:
space:
mode:
authorsuper3 <me@super3.org>2013-05-20 00:30:00 -0400
committersuper3 <me@super3.org>2013-05-20 00:30:00 -0400
commit2341e9b533fedf9bade5b55d676b2c0cf5ed8604 (patch)
tree4322a190260aef9b73e5cfa28d818e65d5a64f05 /doc/unit-tests.md
parent5b5d399593adbdf8b9b4fb49ef39d51d4eac03cd (diff)
downloadbitcoin-2341e9b533fedf9bade5b55d676b2c0cf5ed8604.tar.xz
Docs Markdown Cleanup
Diffstat (limited to 'doc/unit-tests.md')
-rw-r--r--doc/unit-tests.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/unit-tests.md b/doc/unit-tests.md
new file mode 100644
index 0000000000..d6fb2d8e2d
--- /dev/null
+++ b/doc/unit-tests.md
@@ -0,0 +1,35 @@
+Compiling/running bitcoind unit tests
+------------------------------------
+
+bitcoind unit tests are in the `src/test/` directory; they
+use the Boost::Test unit-testing framework.
+
+To compile and run the tests:
+
+ cd src
+ make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on unix
+ ./test_bitcoin # Runs the unit tests
+
+If all tests succeed the last line of output will be:
+`*** No errors detected`
+
+To add more tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
+.cpp files in the test/ directory or add new .cpp files that
+implement new BOOST_AUTO_TEST_SUITE sections (the makefiles are
+set up to add test/*.cpp to test_bitcoin automatically).
+
+
+Compiling/running Bitcoin-Qt unit tests
+---------------------------------------
+
+Bitcoin-Qt unit tests are in the src/qt/test/ directory; they
+use the Qt unit-testing framework.
+
+To compile and run the tests:
+
+ qmake bitcoin-qt.pro BITCOIN_QT_TEST=1
+ make
+ ./bitcoin-qt_test
+
+To add more tests, add them to the `src/qt/test/` directory,
+the `src/qt/test/test_main.cpp` file, and bitcoin-qt.pro.