00001
00002
00003
00004
00005 #include <iostream>
00006
00007 int test_main();
00008
00009 bool tests_failure = false;
00010
00011 void report_failure(char const* err, char const* file, int line)
00012 {
00013 std::cerr << file << ":" << line << "\"" << err << "\"\n";
00014 tests_failure = true;
00015 }
00016
00017 int main()
00018 {
00019 try
00020 {
00021 test_main();
00022 return tests_failure ? 1 : 0;
00023 }
00024 catch (std::exception const& e)
00025 {
00026 std::cerr << "Terminated with exception: \"" << e.what() << "\"\n";
00027 return 1;
00028 }
00029 catch (...)
00030 {
00031 std::cerr << "Terminated with unknown exception\n";
00032 return 1;
00033 }
00034 }
00035