From b00bafae3f1b123d2108454ae5da4c703c91661c Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 28 May 2017 23:33:59 +0200 Subject: Add Observers, useful class for notifying listeners --- test/test.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/test.hh') 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); \ -- cgit v1.2.3-70-g09d2