aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-12 20:23:50 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-09-12 20:23:50 +0100
commitf197a47197b1989a6bf42d947ef752ade358a36e (patch)
treefdfa65a52a1901e6fde065f6eaa08bfff7fc78d5
parent129d9fca402a1935d9777f8e5a2bc5cc0635d7fb (diff)
downloadpaludis-f197a47197b1989a6bf42d947ef752ade358a36e.tar.gz
paludis-f197a47197b1989a6bf42d947ef752ade358a36e.tar.xz
TEST_CHECK_MESSAGE
-rw-r--r--test/test_framework.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_framework.hh b/test/test_framework.hh
index 2af2da7..f097881 100644
--- a/test/test_framework.hh
+++ b/test/test_framework.hh
@@ -276,6 +276,16 @@ namespace test
} while (false)
/**
+ * Check that a is true, with a custom message.
+ */
+#define TEST_CHECK_MESSAGE(a, b) \
+ do { \
+ reached(__PRETTY_FUNCTION__, __FILE__, __LINE__); \
+ check(__PRETTY_FUNCTION__, __FILE__, __LINE__, a, \
+ b); \
+ } while (false)
+
+/**
* Check that a throws an exception of type b.
*/
#define TEST_CHECK_THROWS(a, b) \