]> git.tdb.fi Git - libs/test.git/blobdiff - source/test.cpp
Don't use ++ with a bool
[libs/test.git] / source / test.cpp
index ab6e05234302604fa84435c1f147546d39761b31..910853f28da5dcf6da2e42a3ebde74b806bce513 100644 (file)
@@ -126,7 +126,7 @@ void Test::start_test(const string &descr)
 void Test::pass_test()
 {
        IO::print("\033[32mok\033[0m\n");
-       ++passed;
+       passed = true;
 }
 
 void Test::fail_test(const string &why)
@@ -152,6 +152,11 @@ void Test::debug(const string &str)
        detail_debug += format("%s\n", str);
 }
 
+void Test::fail(const string &why)
+{
+       throw test_failed(why);
+}
+
 
 Test::Factory::Factory()
 {