Unit test framework much like Google Test but with task support. More...
| Macros | |
| #define | UNIT(...) | 
| Define a unit test function. | |
| #define | UNIT_ASSERT(ASSERTION, ...) | 
| Run an assertion and include captured output in any error message. | |
| #define | UNIT_CAPTURE() | 
| A stream that collects output for comparison. | |
| #define | UNIT_DUMP() | 
| Return captured output. | |
| #define | UNIT_EQUAL_BLESSED(f) | 
| Compare captured output to a blessed file. | |
| #define | UNIT_WRITE(f) | 
| Write captured output to file. | |
| Typedefs | |
| template<auto & Target> | |
| using | driver | 
| A test registration. | |
| template<auto & Target> | |
| using | finalization | 
| A test finalization registration. | |
| template<auto & Target> | |
| using | initialization | 
| A test initialization registration. | |
| Assertion macros | |
| Values to include in a failure message may be streamed into an assertion: EXPECT_GE(foo, 0) << foo << " should be non-negative"; Macros that begin with  | |
| #define | ASSERT_TRUE(c) | 
| Condition. | |
| #define | EXPECT_TRUE(c) | 
| Condition. | |
| #define | ASSERT_FALSE(c) | 
| Condition. | |
| #define | EXPECT_FALSE(c) | 
| Condition. | |
| #define | ASSERT_EQ(x, y) | 
| Condition. | |
| #define | EXPECT_EQ(x, y) | 
| Condition. | |
| #define | ASSERT_NE(x, y) | 
| Condition. | |
| #define | EXPECT_NE(x, y) | 
| Condition. | |
| #define | ASSERT_LT(x, y) | 
| Condition. | |
| #define | EXPECT_LT(x, y) | 
| Condition. | |
| #define | ASSERT_LE(x, y) | 
| Condition. | |
| #define | EXPECT_LE(x, y) | 
| Condition. | |
| #define | ASSERT_GT(x, y) | 
| Condition. | |
| #define | EXPECT_GT(x, y) | 
| Condition. | |
| #define | ASSERT_GE(x, y) | 
| Condition. | |
| #define | EXPECT_GE(x, y) | 
| Condition. | |
| #define | ASSERT_STREQ(x, y) | 
| Compare null-terminated strings, abandoning test on inequality. | |
| #define | EXPECT_STREQ(x, y) | 
| Check equality of null-terminated strings. | |
| #define | ASSERT_STRNE(x, y) | 
| Compare null-terminated strings, abandoning test on equality. | |
| #define | EXPECT_STRNE(x, y) | 
| Check inequality of null-terminated strings. | |
| #define | ASSERT_STRCASEEQ(x, y) | 
| Compare null-terminated strings, ignoring case and abandoning test on inequality. | |
| #define | EXPECT_STRCASEEQ(x, y) | 
| Check equality of null-terminated strings, ignoring case. | |
| #define | ASSERT_STRCASENE(x, y) | 
| Compare null-terminated strings, ignoring case and abandoning test on equality. | |
| #define | EXPECT_STRCASENE(x, y) | 
| Check inequality of null-terminated strings, ignoring case. | |
Unit test framework much like Google Test but with task support.
Each Target is a function with signature int(flecsi::scheduler&) or (deprecated) int(); if any returns a non-zero value, so does the process built with flecsi_add_test. Output is via Logging.
Contents are in flecsi::util::unit unless otherwise specified. 
| #define UNIT | ( | ... | ) | 
Define a unit test function.
Should be followed by a compound statement, which can use the other unit-testing macros, and a semicolon, and should generally appear alone in a function that returns int. Optionally, provide an expression convertible to std::string to label the test results (along with __func__); the default is "TEST".
<<, and the following macros may not be used in the compound statement:ASSERT_STRCASEEQ and EXPECT_STRCASEEQ ASSERT_STRCASENE and EXPECT_STRCASENE UNIT_CAPTURE UNIT_DUMP UNIT_BLESSED UNIT_WRITE UNIT_ASSERT ASSERT/EXPECT macros can be used in a lambda defined inside the compound statement with [&]. | #define ASSERT_TRUE | ( | c | ) | 
Condition.
| #define EXPECT_TRUE | ( | c | ) | 
Condition.
| #define ASSERT_FALSE | ( | c | ) | 
Condition.
| #define EXPECT_FALSE | ( | c | ) | 
Condition.
| #define ASSERT_EQ | ( | x, | |
| y ) | 
Condition.
| #define EXPECT_EQ | ( | x, | |
| y ) | 
Condition.
| #define ASSERT_NE | ( | x, | |
| y ) | 
Condition.
| #define EXPECT_NE | ( | x, | |
| y ) | 
Condition.
| #define ASSERT_LT | ( | x, | |
| y ) | 
Condition.
| #define EXPECT_LT | ( | x, | |
| y ) | 
Condition.
| #define ASSERT_LE | ( | x, | |
| y ) | 
Condition.
| #define EXPECT_LE | ( | x, | |
| y ) | 
Condition.
| #define ASSERT_GT | ( | x, | |
| y ) | 
Condition.
| #define EXPECT_GT | ( | x, | |
| y ) | 
Condition.
| #define ASSERT_GE | ( | x, | |
| y ) | 
Condition.
| #define EXPECT_GE | ( | x, | |
| y ) | 
Condition.
| #define ASSERT_STREQ | ( | x, | |
| y ) | 
Compare null-terminated strings, abandoning test on inequality.
| #define EXPECT_STREQ | ( | x, | |
| y ) | 
Check equality of null-terminated strings.
| #define ASSERT_STRNE | ( | x, | |
| y ) | 
Compare null-terminated strings, abandoning test on equality.
| #define EXPECT_STRNE | ( | x, | |
| y ) | 
Check inequality of null-terminated strings.
| #define ASSERT_STRCASEEQ | ( | x, | |
| y ) | 
Compare null-terminated strings, ignoring case and abandoning test on inequality.
| #define EXPECT_STRCASEEQ | ( | x, | |
| y ) | 
Check equality of null-terminated strings, ignoring case.
| #define ASSERT_STRCASENE | ( | x, | |
| y ) | 
Compare null-terminated strings, ignoring case and abandoning test on equality.
| #define EXPECT_STRCASENE | ( | x, | |
| y ) | 
Check inequality of null-terminated strings, ignoring case.
| #define UNIT_CAPTURE | ( | ) | 
A stream that collects output for comparison.
| #define UNIT_DUMP | ( | ) | 
Return captured output.
std::string | #define UNIT_EQUAL_BLESSED | ( | f | ) | 
Compare captured output to a blessed file.
bool | #define UNIT_WRITE | ( | f | ) | 
Write captured output to file.
| #define UNIT_ASSERT | ( | ASSERTION, | |
| ... ) | 
Run an assertion and include captured output in any error message.
| ASSERTION | macro name ( TRUE,EQ, etc.) | 
| using initialization | 
A test initialization registration.
Declare a non-local variable of this type for each function.
| Target | the function to call | 
| using driver | 
A test registration.
Declare a non-local variable of this type for each function.
| Target | the test function to call | 
| using finalization | 
A test finalization registration.
Declare a non-local variable of this type for each function.
| Target | the function to call |