]> git.localhorst.tv Git - blank.git/blobdiff - tst/test.cpp
make test binary exit with failure on failed tests
[blank.git] / tst / test.cpp
index b12d04bc178e945b16ec0d9257b2823311713e5a..f95ead372d3ce212faa3b17872aae9dd6a5fa38e 100644 (file)
@@ -1,5 +1,3 @@
-#include "app/init.hpp"
-
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 
@@ -8,13 +6,12 @@ using CppUnit::TextUi::TestRunner;
 
 
 int main(int, char **) {
-       blank::Init init;
-
        TestRunner runner;
        TestFactoryRegistry &registry = TestFactoryRegistry::getRegistry();
        runner.addTest(registry.makeTest());
-       runner.run();
-
-       return 0;
-
+       if (runner.run()) {
+               return 0;
+       } else {
+               return 1;
+       }
 }