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) {
57 getRunner()->setLifeCycleMatchingPattern(
67 static void exclude(
const char* testClass,
const char* pattern) {
68 getRunner()->setLifeCycleMatchingPattern(testClass, pattern,
76 static void include(
const char* pattern) {
86 static void include(
const char* testClass,
const char* pattern) {
87 getRunner()->setLifeCycleMatchingPattern(testClass, pattern,
93 getRunner()->setVerbosityFlag(verbosity);
98 return getRunner()->isVerbosityFlag(verbosity);
111 getRunner()->setRunnerTimeout(seconds);
116 static const TimeoutType kTimeoutDefault = 10;
122 static uint16_t countTests();
138 void printStartRunner();
147 void setVerbosityFlag(uint8_t verbosity) { mVerbosity = verbosity; }
150 bool isVerbosityFlag(uint8_t verbosity) {
return mVerbosity & verbosity; }
153 void setLifeCycleMatchingPattern(
const char* pattern, uint8_t lifeCycle);
159 void setLifeCycleMatchingPattern(
const char* testClass,
const char* pattern,
163 void setRunnerTimeout(TimeoutType seconds);
175 uint16_t mPassedCount;
176 uint16_t mFailedCount;
177 uint16_t mSkippedCount;
178 uint16_t mExpiredCount;
179 uint16_t mStatusErrorCount;
180 TimeoutType mTimeout;
181 unsigned long mStartTime;
182 unsigned long mEndTime;
The class that runs the various test cases defined by the test() and testing() macros.
Base class of all test cases.
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 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 kLifeCycleExcluded
Test is Excluded by an exclude() method.
static void list()
Print out the known tests.
static void setPrinter(Print *printer)
Set the output printer.
static const uint8_t kLifeCycleNew
Test is new, needs to be setup.
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.