24 void printStatusString(
const char* statusName) {
26 if (compareEqual(statusName, F(
"isExpired"))) {
28 }
else if (compareEqual(statusName, F(
"isNotExpired"))) {
34 for (; *p !=
'\0'; p++) {
46 void printAssertionTestStatusMessage(
bool ok,
const char* file, uint16_t line,
47 const char* testName,
const char* statusName) {
51 if (!isOutput)
return;
57 printer->print(
"Assertion ");
58 printer->print(ok ?
"passed" :
"failed");
59 printer->print(
": Test ");
60 printer->print(testName);
62 printStatusString(statusName);
63 printer->print(
", file ");
65 printer->print(
", line ");
67 printer->println(
'.');
70 bool assertionTestStatus(
const char* file, uint16_t line,
71 const char* testName,
const char* statusName,
bool ok) {
72 printAssertionTestStatusMessage(ok, file, line, testName, statusName);
static const uint8_t kAssertionPassed
Print assertXxx() passed message.
static void setPassOrFail(bool ok)
Set the pass/fail status of the current test.
static Print * getPrinter()
Get the output printer used by the various assertion() methods and the TestRunner.
static const uint8_t kAssertionFailed
Print assertXxx() failed message.
static bool isVerbosity(uint8_t verbosity)
Returns true if ANY of the bit flags of 'verbosity' is set.