|
|
|
@ -60,9 +60,9 @@ public:
@@ -60,9 +60,9 @@ public:
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
const char *_name; ///< name of the current test
|
|
|
|
|
bool _fail; ///< set if any ::require calls indicate the test failed
|
|
|
|
|
static int16_t _passed; ///< global pass count
|
|
|
|
|
static int16_t _failed; ///< global fail count
|
|
|
|
|
bool _fail; ///< set if any ::require calls indicate the test failed
|
|
|
|
|
static int16_t _passed; ///< global pass count
|
|
|
|
|
static int16_t _failed; ///< global fail count
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/// Constructor
|
|
|
|
@ -115,7 +115,7 @@ int16_t Test::_failed = 0;
@@ -115,7 +115,7 @@ int16_t Test::_failed = 0;
|
|
|
|
|
/// the end of the block (or until the _test object that is created otherwise
|
|
|
|
|
/// goes out of scope).
|
|
|
|
|
///
|
|
|
|
|
#define TEST(name) Test _test(#name) |
|
|
|
|
#define TEST(name) Test _test(# name) |
|
|
|
|
|
|
|
|
|
/// Attach an expression to the test's success criteria.
|
|
|
|
|
///
|
|
|
|
@ -123,5 +123,5 @@ int16_t Test::_failed = 0;
@@ -123,5 +123,5 @@ int16_t Test::_failed = 0;
|
|
|
|
|
/// it does not, the text of the expression is output as a diagnostic
|
|
|
|
|
/// and the test is marked as a failure.
|
|
|
|
|
///
|
|
|
|
|
#define REQUIRE(expr) _test.require(expr, #expr) |
|
|
|
|
#define REQUIRE(expr) _test.require(expr, # expr) |
|
|
|
|
|
|
|
|
|