28 #include <avr/pgmspace.h> 33 #include "Verbosity.h" 35 #include "TestRunner.h" 42 const char MetaAssertion::kMessageDone[] PROGMEM =
"done";
43 const char MetaAssertion::kMessageNotDone[] PROGMEM =
"not done";
44 const char MetaAssertion::kMessagePassed[] PROGMEM =
"passed";
45 const char MetaAssertion::kMessageNotPassed[] PROGMEM =
"not passed";
46 const char MetaAssertion::kMessageFailed[] PROGMEM =
"failed";
47 const char MetaAssertion::kMessageNotFailed[] PROGMEM =
"not failed";
48 const char MetaAssertion::kMessageSkipped[] PROGMEM =
"skipped";
49 const char MetaAssertion::kMessageNotSkipped[] PROGMEM =
"not skipped";
50 const char MetaAssertion::kMessageExpired[] PROGMEM =
"timed out";
51 const char MetaAssertion::kMessageNotExpired[] PROGMEM =
"not timed out";
54 bool ok,
const char* file, uint16_t line,
55 const char* testName,
const __FlashStringHelper* statusMessage) {
59 printer->print(
"Assertion ");
60 printer->print(ok ?
"passed" :
"failed");
61 printer->print(
": Test ");
62 printer->print(testName);
63 printer->print(
" is ");
64 printer->print(statusMessage);
65 printer->print(
", file ");
67 printer->print(
", line ");
69 printer->println(
'.');
73 const char* testName,
const __FlashStringHelper* statusMessage,
bool ok) {
74 if (
isDone())
return false;
void setPassOrFail(bool ok)
Set the status to Passed or Failed depending on ok.
bool isOutputEnabled(bool ok)
Returns true if an assertion message should be printed.
bool isDone()
Return true if test is done (passed, failed, skipped, expired).
static Print * getPrinter()
Get the output printer used by the various assertion() methods and the TestRunner.