aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-03-25 23:39:17 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-03-25 23:39:17 +0000
commita3103e76a18b827854e5668df9fe5066879a0dc3 (patch)
tree7a7ce01a8364af50cef0cc2242394eaca0d6acd0
parent1b62f0875154e08d78bba15475738dfb7a882456 (diff)
downloadpaludis-a3103e76a18b827854e5668df9fe5066879a0dc3.tar.gz
paludis-a3103e76a18b827854e5668df9fe5066879a0dc3.tar.xz
More test failure message improvements
-rw-r--r--test/test_framework.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_framework.hh b/test/test_framework.hh
index 021d616..1a97f48 100644
--- a/test/test_framework.hh
+++ b/test/test_framework.hh
@@ -263,11 +263,10 @@ namespace test
#define TEST_CHECK_STRINGIFY_EQUAL(a, b) \
do { \
try { \
- std::string s_a(paludis::stringify(a)); \
- std::string s_b(paludis::stringify(b)); \
- check(__PRETTY_FUNCTION__, __FILE__, __LINE__, s_a == s_b, \
- "Expected '" #a "' to equal '" + s_b + \
- "' but got '" + s_a + "'"); \
+ test::TwoVarHolder test_h(paludis::stringify(a), paludis::stringify(b)); \
+ check(__PRETTY_FUNCTION__, __FILE__, __LINE__, test_h.result, \
+ "Expected 'stringify(" #a ")' to equal 'stringify(" #b \
+ ")' but got '" + test_h.s_a + "'" + test_h.s_d); \
} catch (const TestFailedException &) { \
throw; \
} catch (const std::exception & test_e) { \