58 void fail(
const char* func)
override;
67 return groupTimer.elapsedTime();
104 State state{State::running};
109 #define startTest(s) startItem(_F(s))
125 #define TEST_CASE_1_ARG(name) startItem(_F(name));
126 #define TEST_CASE_2_ARGS(name, desc) startItem(_F(name), _F(desc));
128 #define GET_3RD_ARG(arg1, arg2, arg3, ...) arg3
129 #define TEST_CASE_ARG_CHOOSER(...) GET_3RD_ARG(__VA_ARGS__, TEST_CASE_2_ARGS, TEST_CASE_1_ARG, )
131 #define TEST_CASE(...) TEST_CASE_ARG_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
Template class to implement a polled timer.
Definition: PolledTimer.h:68
The String class.
Definition: WString.h:137
Base class supporting verification for test assertions.
Definition: TestBase.h:31
Class to simplify generation of begin/end messages for a test group.
Definition: TestGroup.h:35
TestGroup(const String &name)
Definition: TestGroup.h:37
State
Definition: TestGroup.h:70
virtual void execute()=0
Implement this method to define the test.
const String & getName()
Definition: TestGroup.h:60
void complete()
Call to complete pending (asynchronous) test.
void pending()
Call to mark test as pending so it will be executed asynchronously Call complete() when test is finis...
Definition: TestGroup.h:92
void startItem(const String &tag, const String &description=nullptr)
Note the start of a test item within a group.
void initialiseAndExecute()
Called by test runner.
State getState() const
Definition: TestGroup.h:77
void fail(const char *func) override
Called when test fails to identify location.
NanoTime::Time< uint32_t > elapsedTime() const
Definition: TestGroup.h:65
@ pending
Definition: Libraries/IOControl/include/IO/Error.h:72