Enable ctest, fix exit status of tests/tests
[libstick.git] / tests / main.cc
index 6dca3334a6d895e95b439b5f6b4eff02fd449801..6016b3b511c6c2e707186bfe085c98f4526e0432 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "booleanmatrix.h"
 #include "simplicialcomplex.h"
+#include "persistence.h"
 
 using namespace std;
 
@@ -13,10 +14,13 @@ int main(int argc, char* argv[]) {
 
     Test::Suite ts;
 
-    ts.add(auto_ptr<Test::Suite>(new BooleanmatrixTestSuite));
-    ts.add(auto_ptr<Test::Suite>(new SimplicialComplexTestSuite));
+    ts.add(auto_ptr<Test::Suite>(new boolean_matrix_TestSuite));
+    ts.add(auto_ptr<Test::Suite>(new simplicial_complex_TestSuite));
+    ts.add(auto_ptr<Test::Suite>(new persistence_TestSuite));
 
     Test::TextOutput output(Test::TextOutput::Verbose);
-    return ts.run(output);
+    if (ts.run(output))
+        return EXIT_SUCCESS;
+    return EXIT_FAILURE;
 }