AUnit
0.3.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit.
|
Similar to Test but performs the loop() method only once. More...
#include <Test.h>
Public Member Functions | |
TestOnce (const char *name) | |
Constructor. More... | |
TestOnce (const __FlashStringHelper *name) | |
Constructor. More... | |
virtual void | loop () override |
Calls the user-provided once() method. More... | |
virtual void | once ()=0 |
User-provided test case. More... | |
![]() | |
Test (const char *name) | |
Constructor taking the name of the given test case. More... | |
Test (const __FlashStringHelper *name) | |
Constructor taking the name of the given test case. More... | |
virtual void | setup () |
Optional method that performs any initialization. More... | |
const FCString & | getName () |
Get the name of the test. More... | |
uint8_t | getStatus () |
Get the status of the test. More... | |
void | setStatus (uint8_t status) |
Set the status of the test. More... | |
void | setPassOrFail (bool ok) |
Set the status to Passed or Failed depending on ok. More... | |
Test ** | getNext () |
Return the next pointer as a pointer to the pointer, similar to getRoot(). More... | |
bool | isDone () |
Return true if test is done (passed, failed, skipped, expired). More... | |
bool | isNotDone () |
Return true if test is done (passed, failed, skipped, expired). More... | |
bool | isPassed () |
Return true if test is passed. More... | |
bool | isNotPassed () |
Return true if test is passed. More... | |
bool | isFailed () |
Return true if test is failed. More... | |
bool | isNotFailed () |
Return true if test is failed. More... | |
bool | isSkipped () |
Return true if test isNot skipped. More... | |
bool | isNotSkipped () |
Return true if test isNot skipped. More... | |
bool | isExpired () |
Return true if test is expired. More... | |
bool | isNotExpired () |
Return true if test is expired. More... | |
void | skip () |
Mark the test as skipped. More... | |
void | expire () |
Mark the test as expired (i.e. More... | |
Additional Inherited Members | |
![]() | |
static Test ** | getRoot () |
Get the pointer to the root pointer. More... | |
![]() | |
static const uint8_t | kStatusNew = 0 |
Test is new, needs to be setup. More... | |
static const uint8_t | kStatusSetup = 1 |
Test is set up. More... | |
static const uint8_t | kStatusPassed = 2 |
Test has passed, or pass() was called. More... | |
static const uint8_t | kStatusFailed = 3 |
Test has failed, or failed() was called. More... | |
static const uint8_t | kStatusSkipped = 4 |
Test is skipped, through the exclude() method or skip() was called. More... | |
static const uint8_t | kStatusExpired = 5 |
Test has timed out, or expire() called. More... | |
![]() | |
void | fail () |
Mark the test as failed. More... | |
void | pass () |
Mark the test as passed. More... | |
|
inlineexplicit |
|
inlineexplicit |
|
overridevirtual |
Calls the user-provided once() method.
If no other assertXxx() macros set the internal status, then this calls pass() to make sure that this test case will be called only once from Test::run().
Implements aunit::Test.
|
pure virtual |
User-provided test case.