summaryrefslogtreecommitdiff
path: root/test/test.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-05-28 23:33:59 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-05-28 23:33:59 +0200
commitb00bafae3f1b123d2108454ae5da4c703c91661c (patch)
tree646c6af6ddcdd6a4354a3981cf02960a016f8fd4 /test/test.hh
parent8f5db09e6c6887dbd7a03912490b481c5ed6ae12 (diff)
Add Observers, useful class for notifying listeners
Diffstat (limited to 'test/test.hh')
-rw-r--r--test/test.hh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test.hh b/test/test.hh
index 8d1f661..153a5b3 100644
--- a/test/test.hh
+++ b/test/test.hh
@@ -34,6 +34,17 @@
} \
} while (false)
+#define ASSERT_TRUE(actual) \
+ do { \
+ auto a_ = (actual); \
+ if (!a_) { \
+ std::cerr << __FILE__ << ':' << __LINE__ << ": " \
+ << __FUNCTION__ << ": Expected " << a_ \
+ << " to be true" << std::endl; \
+ return false; \
+ } \
+ } while (false)
+
#define ASSERT_STREQ(expected, actual) \
do { \
auto e_ = (expected); \