AUnit
1.7.1
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
|
Verbose versions of the macros in AssertMacros.h. More...
Go to the source code of this file.
Macros | |
#define | assertEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2. | |
#define | assertNotEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. | |
#define | assertLess(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. | |
#define | assertMore(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. | |
#define | assertLessOrEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. | |
#define | assertMoreOrEqual(arg1, arg2) assertOpVerboseInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. | |
#define | assertStringCaseEqual(arg1, arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive. More... | |
#define | assertStringCaseNotEqual(arg1, arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive. More... | |
#define | assertTrue(arg) assertBoolVerboseInternal(arg,true) |
Assert that arg is true. | |
#define | assertFalse(arg) assertBoolVerboseInternal(arg,false) |
Assert that arg is false. | |
#define | assertOpVerboseInternal(arg1, op, opName, arg2) |
Internal helper macro, shouldn't be called directly by users. More... | |
#define | assertBoolVerboseInternal(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... | |
Verbose versions of the macros in AssertMacros.h.
These capture the string of the actual arguments and pass them to the respective assertionVerbose() methods so that verbose messages can be printed.
Definition in file AssertVerboseMacros.h.
#define assertBoolVerboseInternal | ( | arg, | |
value | |||
) |
Internal helper macro, shouldn't be called directly by users.
Definition at line 87 of file AssertVerboseMacros.h.
#define assertNear | ( | arg1, | |
arg2, | |||
error | |||
) |
Assert that arg1 and arg2 are within error of each other.
Definition at line 93 of file AssertVerboseMacros.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 114 of file AssertVerboseMacros.h.
#define assertNotNear | ( | arg1, | |
arg2, | |||
error | |||
) |
Assert that arg1 and arg2 are NOT within error of each other.
Definition at line 101 of file AssertVerboseMacros.h.
#define assertOpVerboseInternal | ( | arg1, | |
op, | |||
opName, | |||
arg2 | |||
) |
Internal helper macro, shouldn't be called directly by users.
Definition at line 80 of file AssertVerboseMacros.h.
#define assertStringCaseEqual | ( | arg1, | |
arg2 | |||
) |
Assert that string arg1 is equal to string arg2, case-insensitive.
Definition at line 64 of file AssertVerboseMacros.h.
#define assertStringCaseNotEqual | ( | arg1, | |
arg2 | |||
) |
Assert that string arg1 is not equal to string arg2, case-insensitive.
Definition at line 69 of file AssertVerboseMacros.h.