X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fcollection.cc;h=0b2b32492230b3f83c22229291eaeb2fdce1804f;hb=2eb14a59f3626073017de925929dcc7e3e9eb43d;hp=1b4915e13d75ac1802e40a9cd37906b83fb814ad;hpb=17690735658d7b44f91579df91e31da9ae185158;p=awesomized%2Flibmemcached diff --git a/libtest/collection.cc b/libtest/collection.cc index 1b4915e1..0b2b3249 100644 --- a/libtest/collection.cc +++ b/libtest/collection.cc @@ -51,11 +51,14 @@ static test_return_t runner_code(libtest::Framework* frame, try { _timer.reset(); + assert(frame); + assert(frame->runner()); + assert(run->test_fn); return_code= frame->runner()->main(run->test_fn, frame->creators_ptr()); } // Special case where check for the testing of the exception // system. - catch (libtest::fatal &e) + catch (const libtest::fatal& e) { if (libtest::fatal::is_disabled()) { @@ -133,11 +136,11 @@ test_return_t Collection::exec() } libtest::cancel_alarm(); } - catch (libtest::fatal &e) + catch (const libtest::fatal& e) { - stream::cerr(e.file(), e.line(), e.func()) << e.what(); _failed++; formatter()->failed(); + stream::make_cerr(e.file(), e.line(), e.func()) << e.what(); throw; } @@ -159,7 +162,7 @@ test_return_t Collection::exec() break; default: - fatal_message("invalid return code"); + FATAL("invalid return code"); } #if 0 @TODO add code here to allow for a collection to define a method to reset to allow tests to continue.