25 #ifndef AUNIT_TEST_RUNNER_H 26 #define AUNIT_TEST_RUNNER_H 47 static void run() { getRunner()->runTest(); }
50 static void list() { getRunner()->listTests(); }
56 static void exclude(
const char* pattern) {
66 static void exclude(
const char* testClass,
const char* pattern) {
67 getRunner()->setStatusMatchingPattern(testClass, pattern,
75 static void include(
const char* pattern) {
85 static void include(
const char* testClass,
const char* pattern) {
86 getRunner()->setStatusMatchingPattern(testClass, pattern,
92 getRunner()->setVerbosityFlag(verbosity);
97 return getRunner()->isVerbosityFlag(verbosity);
110 getRunner()->setRunnerTimeout(seconds);
121 static uint16_t countTests();
137 void printStartRunner();
146 void setVerbosityFlag(uint8_t verbosity) { mVerbosity = verbosity; }
149 bool isVerbosityFlag(uint8_t verbosity) {
return mVerbosity & verbosity; }
152 void setStatusMatchingPattern(
const char* pattern, uint8_t status);
158 void setStatusMatchingPattern(
const char* testClass,
const char* pattern,
174 uint16_t mPassedCount;
175 uint16_t mFailedCount;
176 uint16_t mSkippedCount;
177 uint16_t mExpiredCount;;
179 unsigned long mStartTime;
The class that runs the various test cases defined by the test() and testing() macros.
static void exclude(const char *pattern)
Exclude the tests which match the pattern.
static void setTimeout(TimeoutType seconds)
Set test runner timeout across all tests, in seconds.
static void include(const char *pattern)
Include the tests which match the pattern.
static const uint8_t kStatusNew
Test is new, needs to be setup.
static void exclude(const char *testClass, const char *pattern)
Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenatio...
static void setVerbosity(uint8_t verbosity)
Set the verbosity flag.
uint8_t TimeoutType
Integer type of the timeout parameter.
static void run()
Run all tests using the current runner.
static const uint8_t kStatusSkipped
Test is skipped, through the exclude() method or skip() was called.
static void list()
Print out the known tests.
static void setPrinter(Print *printer)
Set the output printer.
static void include(const char *testClass, const char *pattern)
Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenatio...
static bool isVerbosity(uint8_t verbosity)
Returns true if ANY of the bit flags of 'verbosity' is set.