AUnit
0.5.2
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
|
The class that runs the various test cases defined by the test() and testing() macros. More...
#include <TestRunner.h>
Public Types | |
typedef uint8_t | TimeoutType |
Integer type of the timeout parameter. More... | |
Static Public Member Functions | |
static void | run () |
Run all tests using the current runner. More... | |
static void | list () |
Print out the known tests. More... | |
static void | exclude (const char *pattern) |
Exclude the tests which match the pattern. More... | |
static void | exclude (const char *testClass, const char *pattern) |
Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro. More... | |
static void | include (const char *pattern) |
Include the tests which match the pattern. More... | |
static void | include (const char *testClass, const char *pattern) |
Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro. More... | |
static void | setVerbosity (uint8_t verbosity) |
Set the verbosity flag. More... | |
static bool | isVerbosity (uint8_t verbosity) |
Returns true if ANY of the bit flags of 'verbosity' is set. More... | |
static void | setPrinter (Print *printer) |
Set the output printer. More... | |
static void | setTimeout (TimeoutType seconds) |
Set test runner timeout across all tests, in seconds. More... | |
The class that runs the various test cases defined by the test() and testing() macros.
It prints the summary of each test as well as the final summary of the entire run at the end. In the future, it may be possible to allow a different TestRunner to be used.
Definition at line 41 of file TestRunner.h.
typedef uint8_t aunit::TestRunner::TimeoutType |
|
inlinestatic |
Exclude the tests which match the pattern.
Currently supports only a trailing '*'. For example, exclude("flash*").
Definition at line 56 of file TestRunner.h.
|
inlinestatic |
Exclude the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro.
Currently supports only a trailing '*'. For example, exclude("CustomTest", "flash*").
Definition at line 67 of file TestRunner.h.
|
inlinestatic |
Include the tests which match the pattern.
Currently supports only a trailing '*'. For example, include("flash*").
Definition at line 76 of file TestRunner.h.
|
inlinestatic |
Include the tests which match the pattern given by (testClass + "_" + pattern), the same concatenation rule used by the testF() macro.
Currently supports only a trailing '*'. For example, include("CustomTest", "flash*").
Definition at line 86 of file TestRunner.h.
|
inlinestatic |
Returns true if ANY of the bit flags of 'verbosity' is set.
Definition at line 97 of file TestRunner.h.
|
inlinestatic |
|
inlinestatic |
Run all tests using the current runner.
Definition at line 47 of file TestRunner.h.
|
static |
Set the output printer.
Definition at line 46 of file TestRunner.cpp.
|
inlinestatic |
Set test runner timeout across all tests, in seconds.
Set to 0 for infinite timeout. Useful for preventing testing() test cases that never end. This is a timeout for the TestRunner itself, not for individual tests.
Definition at line 110 of file TestRunner.h.
|
inlinestatic |
Set the verbosity flag.
Definition at line 92 of file TestRunner.h.