AUnit
1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
|
Various assertion macros (assertXxx()) are defined in this header. More...
Go to the source code of this file.
Macros | |
#define | assertEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2. | |
#define | assertNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. | |
#define | assertLess(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. | |
#define | assertMore(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. | |
#define | assertLessOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. | |
#define | assertMoreOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. | |
#define | assertStringCaseEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseEqual,"==",arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive. | |
#define | assertStringCaseNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseNotEqual,"!=",arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive. | |
#define | assertTrue(arg) assertBoolInternal(arg,true) |
Assert that arg is true. | |
#define | assertFalse(arg) assertBoolInternal(arg,false) |
Assert that arg is false. | |
#define | assertOpInternal(arg1, op, opName, arg2) |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertBoolInternal(arg, value) |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertNear(arg1, arg2, error) |
Assert that arg1 and arg2 are within error of each other. More... | |
#define | assertNotNear(arg1, arg2, error) |
Assert that arg1 and arg2 are NOT within error of each other. More... | |
#define | assertNoFatalFailure(statement) |
Assert that the inner 'statement' returns with no fatal assertions. More... | |
Various assertion macros (assertXxx()) are defined in this header.
These macros can be used only in a subclass of TestOnce or TestAgain, which is true for all tests created by test(), testing(), testF() and testingF().
Definition in file AssertMacros.h.
#define assertBoolInternal | ( | arg, | |
value | |||
) |
Internal helper macro, shouldn't be called directly by users.
Definition at line 84 of file AssertMacros.h.
#define assertNear | ( | arg1, | |
arg2, | |||
error | |||
) |
Assert that arg1 and arg2 are within error of each other.
Definition at line 90 of file AssertMacros.h.
#define assertNoFatalFailure | ( | statement | ) |
Assert that the inner 'statement' returns with no fatal assertions.
This is required because AUnit does not use exceptions, so we have to check the assertion state after calling an inner function. This macro is similar to the ASSERT_NO_FATAL_FAILURE(statement)
in GoogleTest.
Definition at line 109 of file AssertMacros.h.
#define assertNotNear | ( | arg1, | |
arg2, | |||
error | |||
) |
Assert that arg1 and arg2 are NOT within error of each other.
Definition at line 97 of file AssertMacros.h.
#define assertOpInternal | ( | arg1, | |
op, | |||
opName, | |||
arg2 | |||
) |
Internal helper macro, shouldn't be called directly by users.
Definition at line 78 of file AssertMacros.h.