summaryrefslogtreecommitdiff
path: root/uunit.h
diff options
context:
space:
mode:
Diffstat (limited to 'uunit.h')
-rw-r--r--uunit.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/uunit.h b/uunit.h
index 9c0775d..c9cb258 100644
--- a/uunit.h
+++ b/uunit.h
@@ -167,6 +167,7 @@ protected:
}
#define uUNIT_TEST(func) \
registerTest(this, &func, #func, __FILE__)
+ #define uTEST(args...) uUNIT_TEST(args)
void u_assert(bool value, const char* expr,
const char* file, std::size_t line)
@@ -182,6 +183,7 @@ protected:
//! Convenience macro to pass along filename and linenumber
#define uUNIT_ASSERT(value) \
u_assert(value, #value, __FILE__, __LINE__)
+ #define uASSERT(args...) uUNIT_ASSERT(args)
void assert_equal(double expected, double value,
const char* file, std::size_t line)
@@ -211,7 +213,7 @@ protected:
//! Convenience macro to pass along filename and linenumber
#define uUNIT_ASSERT_EQUAL(expected, value) \
assert_equal(expected, value, __FILE__, __LINE__)
-
+ #define uASSERT_EQUAL(args...) uUNIT_ASSERT_EQUAL(args)
template<typename T>
void assert_throws(const char* expected, std::function<void()> expr,
@@ -241,6 +243,7 @@ protected:
}
#define uUNIT_ASSERT_THROWS(expected, expr) \
assert_throws<expected>(#expected, [&](){ expr; }, __FILE__, __LINE__)
+ #define uASSERT_THROWS(args...) uUNIT_ASSERT_THROWS(args)
private:
static std::string sanitize(const std::string& input)