diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-06-28 19:41:36 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-06-28 19:41:36 +0200 |
| commit | ff868f238b58323465505c907a62064d4cbfb0a1 (patch) | |
| tree | fca2a01448783037d4eac4544da0b37b697bc707 | |
| parent | 6374857bfd25a033ff31316157c985645ae4519c (diff) | |
| download | Project-Tick-ff868f238b58323465505c907a62064d4cbfb0a1.tar.gz Project-Tick-ff868f238b58323465505c907a62064d4cbfb0a1.zip | |
Clarify fail messages on EXPECT_EXCEPTION
| -rw-r--r-- | test/microtest.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/microtest.h b/test/microtest.h index 084a85496c..8806775f12 100644 --- a/test/microtest.h +++ b/test/microtest.h @@ -26,8 +26,8 @@ exit(EXIT_FAILURE); } #define ASSERT(expr) { if(!(expr)) FAIL_TEST } #define EXPECT_EXCEPTION(expr, type) { \ - try { (expr); std::cerr << "Expected " #type " to be thrown" << std::endl; FAIL_TEST } \ + try { (expr); std::cerr << "Expected " #type " to be thrown, got no exception instead" << std::endl; FAIL_TEST } \ catch(type&) {} \ - catch(...) { std::cerr << "Expected " #type " to be thrown" << std::endl; FAIL_TEST } } + catch(...) { std::cerr << "Expected " #type " to be thrown, got something else instead" << std::endl; FAIL_TEST } } #endif |
