summaryrefslogtreecommitdiff
path: root/tests/UnitTests.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-08 02:53:28 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:40 -0400
commitfa81dc479801ba1343695d66cdb37d8b80bfae9d (patch)
tree835724102a2c99a88d9e67bae71a94ee49e1f674 /tests/UnitTests.cc
parentee4a16743960122bf2b626f62827b7332680ebf5 (diff)
downloadfork-ledger-fa81dc479801ba1343695d66cdb37d8b80bfae9d.tar.gz
fork-ledger-fa81dc479801ba1343695d66cdb37d8b80bfae9d.tar.bz2
fork-ledger-fa81dc479801ba1343695d66cdb37d8b80bfae9d.zip
Added target fullcheck.
Diffstat (limited to 'tests/UnitTests.cc')
-rw-r--r--tests/UnitTests.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/UnitTests.cc b/tests/UnitTests.cc
index 1c695340..7f5d1333 100644
--- a/tests/UnitTests.cc
+++ b/tests/UnitTests.cc
@@ -17,17 +17,7 @@
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("Framework");
-CPPUNIT_REGISTRY_ADD_TO_DEFAULT("corelib");
-
-CPPUNIT_REGISTRY_ADD("numerics", "corelib");
-CPPUNIT_REGISTRY_ADD("balances", "corelib");
-CPPUNIT_REGISTRY_ADD("values", "corelib");
-
-CPPUNIT_REGISTRY_ADD_TO_DEFAULT("driver");
-CPPUNIT_REGISTRY_ADD_TO_DEFAULT("journal");
-CPPUNIT_REGISTRY_ADD_TO_DEFAULT("reports");
-CPPUNIT_REGISTRY_ADD_TO_DEFAULT("transforms");
-
+CPPUNIT_REGISTRY_ADD_TO_DEFAULT("numerics");
// Create a sample test, which acts both as a template, and a
// verification that the basic framework is functioning.
@@ -62,9 +52,17 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(UnitTests, "framework");
int main(int argc, char* argv[])
{
+ int index = 1;
+
+ if (argc > index && std::string(argv[index]) == "--verify") {
+ ledger::verify_enabled = true;
+ index++;
+ }
+
// Retreive test path from command line first argument. Default to
// "" which resolves to the top level suite.
- std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
+ std::string testPath = ((argc > index) ? std::string(argv[index]) :
+ std::string(""));
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
@@ -85,8 +83,14 @@ int main(int argc, char* argv[])
CPPUNIT_NS::TestRunner runner;
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
try {
+ IF_VERIFY()
+ initialize_memory_tracing();
+
runner.run(controller, testPath);
+ IF_VERIFY()
+ shutdown_memory_tracing();
+
// Print test in a compiler compatible format.
CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
outputter.write();