Commit 79b02bd4 authored by berenger-bramas's avatar berenger-bramas

Change unit test to make the exit code as the number of errors.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@181 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 1001f6c7
......@@ -11,8 +11,7 @@
#define TestClass(X)\
int main(void){\
X Controller;\
Controller.Run();\
return 0;\
return Controller.Run();\
}\
......@@ -141,8 +140,9 @@ protected:
public :
/**
* Processing the test
* return application exit code (= nb of errors)
*/
void Run(){
int Run(){
tests.clear();
// register tests
SetTests();
......@@ -181,6 +181,8 @@ public :
After();
std::cout <<"Test is over, " << (totalTests-failledTests) << " Passed, " << failledTests << " Failled\n";
return failledTests;
}
};
......
......@@ -10,13 +10,13 @@ class MyTest : public FUTester<MyTest> {
void TestOne(){
assert(true);
assert(false);
//or assert(false); make an error
assert(1 == 1);
}
void TestTwo(){
equal(1 , 1);
different(1 , 1);
different(1 , 2);
}
void After(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment