Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tut should not catch exceptions so that gdb can show the original bac…

…ktrace.
  • Loading branch information...
commit 4171d28d61a0697fc3270303d749b699da094ba6 1 parent c38707e
@FooBarWidget FooBarWidget authored
Showing with 16 additions and 19 deletions.
  1. +14 −19 test/cxx/CxxTestMain.cpp
  2. +2 −0  test/tut/tut.h
View
33 test/cxx/CxxTestMain.cpp
@@ -98,25 +98,20 @@ main(int argc, char *argv[]) {
allGroups = tut::runner.get().list_groups();
parseOptions(argc, argv);
- try {
- bool all_ok = true;
- if (runMode == RUN_ALL_GROUPS) {
- tut::runner.get().run_tests();
- all_ok = reporter.all_ok();
- } else {
- all_ok = true;
- for (groupnames_iterator it = groupsToRun.begin(); it != groupsToRun.end(); it++) {
- tut::runner.get().run_tests(*it);
- all_ok = all_ok && reporter.all_ok();
- }
+ bool all_ok = true;
+ if (runMode == RUN_ALL_GROUPS) {
+ tut::runner.get().run_tests();
+ all_ok = reporter.all_ok();
+ } else {
+ all_ok = true;
+ for (groupnames_iterator it = groupsToRun.begin(); it != groupsToRun.end(); it++) {
+ tut::runner.get().run_tests(*it);
+ all_ok = all_ok && reporter.all_ok();
}
- if (all_ok) {
- return 0;
- } else {
- return 1;
- }
- } catch (const std::exception &ex) {
- cerr << "*** Exception raised: " << ex.what() << endl;
- return 2;
+ }
+ if (all_ok) {
+ return 0;
+ } else {
+ return 1;
}
}
View
2  test/tut/tut.h
@@ -1100,6 +1100,7 @@ class test_group : public group_base
test_result::ex_ctor, ex);
return tr;
}
+ /*
catch (const std::exception& ex)
{
// test failed with std::exception
@@ -1122,6 +1123,7 @@ class test_group : public group_base
test_result::ex);
return tr;
}
+ */
// test passed
test_result tr(name_,ti->first, current_test_name, test_result::ok);
Please sign in to comment.
Something went wrong with that request. Please try again.