Go to the documentation of this file.
18#ifndef __LIBTEST_TESTCASE_H
19#define __LIBTEST_TESTCASE_H
43#define protected public
52#define TestCase(name) \
53 TestResult name (void); \
54 LocalTest instance_##name (QUOTE(name), name); \
55 TestResult name (void)
64#define testAssert(expression) \
68 snprintf(msg, sizeof(msg), "%s:%d:%s testAssert failed: `%s' .. ", __FILE__, __LINE__, __FUNCTION__, QUOTE(expression)); \
69 return TestResult(TestResult::Failure, msg); \
75#define testString(s1, s2) \
76 testAssert(MemoryBlock::compare((s1), (s2)))