/* * test.h * * Created on: 17.10.2013 * Author: trifon */ #ifndef TEST_H_ #define TEST_H_ #include using namespace std; // bool test(); typedef bool (*TestFunction)(); struct Test { char description[100]; TestFunction test; }; void runTests(Test* tests, int n) { for(int i = 0; i < n; i++) { cout << tests[i].description << ": "; if (tests[i].test()) cout << "OK"; else cout << "Failed!"; cout << endl; } } #endif /* TEST_H_ */