summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-06-28 19:41:36 +0200
committerljfa-ag <ljfa-ag@web.de>2015-06-28 19:41:36 +0200
commitff868f238b58323465505c907a62064d4cbfb0a1 (patch)
treefca2a01448783037d4eac4544da0b37b697bc707 /test
parent6374857bfd25a033ff31316157c985645ae4519c (diff)
downloadProject-Tick-ff868f238b58323465505c907a62064d4cbfb0a1.tar.gz
Project-Tick-ff868f238b58323465505c907a62064d4cbfb0a1.zip
Clarify fail messages on EXPECT_EXCEPTION
Diffstat (limited to 'test')
-rw-r--r--test/microtest.h4
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