AUnit
1.3
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. More... | |
#define | assertNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2. More... | |
#define | assertLess(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2. More... | |
#define | assertMore(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2. More... | |
#define | assertLessOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2. More... | |
#define | assertMoreOrEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2. More... | |
#define | assertStringCaseEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseEqual,"==",arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive. More... | |
#define | assertStringCaseNotEqual(arg1, arg2) assertOpInternal(arg1,aunit::internal::compareStringCaseNotEqual,"!=",arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive. More... | |
#define | assertTrue(arg) assertBoolInternal(arg,true) |
Assert that arg is true. More... | |
#define | assertFalse(arg) assertBoolInternal(arg,false) |
Assert that arg is false. More... | |
#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... | |
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 assertEqual | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareEqual,"==",arg2) |
Assert that arg1 is equal to arg2.
Definition at line 40 of file AssertMacros.h.
#define assertFalse | ( | arg | ) | assertBoolInternal(arg,false) |
Assert that arg is false.
Definition at line 75 of file AssertMacros.h.
#define assertLess | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareLess,"<",arg2) |
Assert that arg1 is less than arg2.
Definition at line 48 of file AssertMacros.h.
#define assertLessOrEqual | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareLessOrEqual,"<=",arg2) |
Assert that arg1 is less than or equal to arg2.
Definition at line 56 of file AssertMacros.h.
#define assertMore | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareMore,">",arg2) |
Assert that arg1 is more than arg2.
Definition at line 52 of file AssertMacros.h.
#define assertMoreOrEqual | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareMoreOrEqual,">=",arg2) |
Assert that arg1 is more than or equal to arg2.
Definition at line 60 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 assertNotEqual | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareNotEqual,"!=",arg2) |
Assert that arg1 is not equal to arg2.
Definition at line 44 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.
#define assertStringCaseEqual | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareStringCaseEqual,"==",arg2) |
Assert that string arg1 is equal to string arg2, case-insensitive.
Definition at line 64 of file AssertMacros.h.
#define assertStringCaseNotEqual | ( | arg1, | |
arg2 | |||
) | assertOpInternal(arg1,aunit::internal::compareStringCaseNotEqual,"!=",arg2) |
Assert that string arg1 is not equal to string arg2, case-insensitive.
Definition at line 68 of file AssertMacros.h.
#define assertTrue | ( | arg | ) | assertBoolInternal(arg,true) |
Assert that arg is true.
Definition at line 72 of file AssertMacros.h.