//---------------------------------------------------------------------- /// ...description... /// @param ... /// @param ... bool test_a (...) { ; if (!ok) { cerr << "ERROR: " << __FILE__ << ":" << __LINE__ << " " << "" << endl; return false; } ; if (!ok) { cerr << "ERROR: " << __FILE__ << ":" << __LINE__ << " " << "" << endl; return false; } return true; } //---------------------------------------------------------------------- /// ...description... /// @param ... /// @param ... bool test_b (...) { // if it is easier to write the test as a shell script, then // (at least for Linux) you could do: int status = system ("command"); if (status != 0) { cerr << "ERROR: " << __FILE__ << ":" << __LINE__ << " " << "" << endl; return false; } } //---------------------------------------------------------------------- /// ...description... /// @param ... /// @param ... bool test_c (...) { ... } //---------------------------------------------------------------------- int main (int argc, char** argv) { int return_value = 0; if (!test_a(...)) { cerr << "FAILURE: " << __FILE__ << ":" << __LINE__ << " " << "test_a failed" << endl; return_value = 1; } if (!test_b(...)) { cerr << "FAILURE: " << __FILE__ << ":" << __LINE__ << " " << "test_b failed" << endl; return_value = 1; } if (!test_c(...)) { cerr << "FAILURE: " << __FILE__ << ":" << __LINE__ << " " << "test_c failed" << endl; return_value = 1; } if (return_value == 0) { cerr << "SUCCESS" << endl; } return return_value; }