AUnit
1.7.1
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 uint16_t | TimeoutType |
Integer type of the timeout parameter. More... | |
Static Public Member Functions | |
static void | run () |
Run all tests using the current runner. | |
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 | excludesub (const char *substring) |
Exclude the tests which match the substring. | |
static void | includesub (const char *substring) |
Include the tests which match the substring. | |
static void | setVerbosity (uint8_t verbosity) |
Set the verbosity flag. | |
static bool | isVerbosity (uint8_t verbosity) |
Returns true if ANY of the bit flags of 'verbosity' is set. | |
static void | setPrinter (Print *printer) |
Set the output printer. | |
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 48 of file TestRunner.h.
typedef uint16_t aunit::TestRunner::TimeoutType |
Integer type of the timeout parameter.
Seconds. Default is kTimeoutDefault = 10
Definition at line 54 of file TestRunner.h.
|
inlinestatic |
Exclude the tests which match the pattern.
Currently supports only a trailing '*'. For example, exclude("flash*").
Definition at line 70 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 81 of file TestRunner.h.
|
inlinestatic |
Include the tests which match the pattern.
Currently supports only a trailing '*'. For example, include("flash*").
Definition at line 90 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 100 of file TestRunner.h.
|
inlinestatic |
|
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. Upper limit is 65535 seconds (just over 18 hours).
Definition at line 136 of file TestRunner.h.