AUnit  0.5.0
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
Macros
MetaAssertMacros.h File Reference

Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in this header. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define checkTestDone(name)   (test_##name##_instance.isDone())
 Return true if test 'name' is done. More...
 
#define checkTestNotDone(name)   (test_##name##_instance.isNotDone())
 Return true if test 'name' is not done. More...
 
#define checkTestPass(name)   (test_##name##_instance.isPassed())
 Return true if test 'name' has passed. More...
 
#define checkTestNotPass(name)   (test_##name##_instance.isNotPassed())
 Return true if test 'name' has not passed. More...
 
#define checkTestFail(name)   (test_##name##_instance.isFailed())
 Return true if test 'name' has failed. More...
 
#define checkTestNotFail(name)   (test_##name##_instance.isNotFailed())
 Return true if test 'name' has not failed. More...
 
#define checkTestSkip(name)   (test_##name##_instance.isSkipped())
 Return true if test 'name' has been skipped. More...
 
#define checkTestNotSkip(name)   (test_##name##_instance.isNotSkipped())
 Return true if test 'name' has not been skipped. More...
 
#define checkTestExpire(name)   (test_##name##_instance.isExpired())
 Return true if test 'name' has timed out. More...
 
#define checkTestNotExpire(name)   (test_##name##_instance.isNotExpired())
 Return true if test 'name' has not timed out. More...
 
#define assertTestDone(name)   assertTestStatusInternal(name, isDone, kMessageDone)
 Assert that test 'name' is done. More...
 
#define assertTestNotDone(name)   assertTestStatusInternal(name, isNotDone, kMessageNotDone)
 Assert that test 'name' is not done. More...
 
#define assertTestPass(name)   assertTestStatusInternal(name, isPassed, kMessagePassed)
 Assert that test 'name' has passed. More...
 
#define assertTestNotPass(name)   assertTestStatusInternal(name, isNotPassed, kMessageNotPassed)
 Assert that test 'name' has not passed. More...
 
#define assertTestFail(name)   assertTestStatusInternal(name, isFailed, kMessageFailed)
 Assert that test 'name' has failed. More...
 
#define assertTestNotFail(name)   assertTestStatusInternal(name, isNotFailed, kMessageNotFailed)
 Assert that test 'name' has not failed. More...
 
#define assertTestSkip(name)   assertTestStatusInternal(name, isSkipped, kMessageSkipped)
 Assert that test 'name' has been skipped. More...
 
#define assertTestNotSkip(name)   assertTestStatusInternal(name, isNotSkipped, kMessageNotSkipped)
 Assert that test 'name' has not been skipped. More...
 
#define assertTestExpire(name)   assertTestStatusInternal(name, isExpired, kMessageExpired)
 Assert that test 'name' has timed out. More...
 
#define assertTestNotExpire(name)   assertTestStatusInternal(name, isNotExpired, kMessageNotExpired)
 Assert that test 'name' has not timed out. More...
 
#define assertTestStatusInternal(name, method, message)
 Internal helper macro, shouldn't be called directly by users. More...
 
#define checkTestDoneF(testClass, name)   (testClass##_##name##_instance.isDone())
 Return true if test 'name' is done. More...
 
#define checkTestNotDoneF(testClass, name)   (testClass##_##name##_instance.isNotDone())
 Return true if test 'name' is not done. More...
 
#define checkTestPassF(testClass, name)   (testClass##_##name##_instance.isPassed())
 Return true if test 'name' has passed. More...
 
#define checkTestNotPassF(testClass, name)   (testClass##_##name##_instance.isNotPassed())
 Return true if test 'name' has not passed. More...
 
#define checkTestFailF(testClass, name)   (testClass##_##name##_instance.isFailed())
 Return true if test 'name' has failed. More...
 
#define checkTestNotFailF(testClass, name)   (testClass##_##name##_instance.isNotFailed())
 Return true if test 'name' has not failed. More...
 
#define checkTestSkipF(testClass, name)   (testClass##_##name##_instance.isSkipped())
 Return true if test 'name' has been skipped. More...
 
#define checkTestNotSkipF(testClass, name)   (testClass##_##name##_instance.isNotSkipped())
 Return true if test 'name' has not been skipped. More...
 
#define checkTestExpireF(testClass, name)   (testClass##_##name##_instance.isExpired())
 Return true if test 'name' has timed out. More...
 
#define checkTestNotExpireF(testClass, name)   (testClass##_##name##_instance.isNotExpired())
 Return true if test 'name' has not timed out. More...
 
#define assertTestDoneF(testClass, name)   assertTestStatusInternalF(testClass, name, isDone, kMessageDone)
 Assert that test 'name' is done. More...
 
#define assertTestNotDoneF(testClass, name)   assertTestStatusInternalF(testClass, name, isNotDone, kMessageNotDone)
 Assert that test 'name' is not done. More...
 
#define assertTestPassF(testClass, name)   assertTestStatusInternalF(testClass, name, isPassed, kMessagePassed)
 Assert that test 'name' has passed. More...
 
#define assertTestNotPassF(testClass, name)   assertTestStatusInternalF(testClass, name, isNotPassed, kMessageNotPassed)
 Assert that test 'name' has not passed. More...
 
#define assertTestFailF(testClass, name)   assertTestStatusInternalF(testClass, name, isFailed, kMessageFailed)
 Assert that test 'name' has failed. More...
 
#define assertTestNotFailF(testClass, name)   assertTestStatusInternalF(testClass, name, isNotFailed, kMessageNotFailed)
 Assert that test 'name' has not failed. More...
 
#define assertTestSkipF(testClass, name)   assertTestStatusInternalF(testClass, name, isSkipped, kMessageSkipped)
 Assert that test 'name' has been skipped. More...
 
#define assertTestNotSkipF(testClass, name)
 Assert that test 'name' has not been skipped. More...
 
#define assertTestExpireF(testClass, name)   assertTestStatusInternalF(testClass, name, isExpired, kMessageExpired)
 Assert that test 'name' has timed out. More...
 
#define assertTestNotExpireF(testClass, name)
 Assert that test 'name' has not timed out. More...
 
#define assertTestStatusInternalF(testClass, name, method, message)
 Internal helper macro, shouldn't be called directly by users. More...
 

Detailed Description

Various assertTestXxx(), checkTestXxx(), assertTestXxxF() and checkTestXxxF() macros are defined in this header.

Definition in file MetaAssertMacros.h.

Macro Definition Documentation

◆ assertTestDone

#define assertTestDone (   name)    assertTestStatusInternal(name, isDone, kMessageDone)

Assert that test 'name' is done.

Definition at line 75 of file MetaAssertMacros.h.

◆ assertTestDoneF

#define assertTestDoneF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isDone, kMessageDone)

Assert that test 'name' is done.

Definition at line 168 of file MetaAssertMacros.h.

◆ assertTestExpire

#define assertTestExpire (   name)    assertTestStatusInternal(name, isExpired, kMessageExpired)

Assert that test 'name' has timed out.

Definition at line 107 of file MetaAssertMacros.h.

◆ assertTestExpireF

#define assertTestExpireF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isExpired, kMessageExpired)

Assert that test 'name' has timed out.

Definition at line 201 of file MetaAssertMacros.h.

◆ assertTestFail

#define assertTestFail (   name)    assertTestStatusInternal(name, isFailed, kMessageFailed)

Assert that test 'name' has failed.

Definition at line 91 of file MetaAssertMacros.h.

◆ assertTestFailF

#define assertTestFailF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isFailed, kMessageFailed)

Assert that test 'name' has failed.

Definition at line 184 of file MetaAssertMacros.h.

◆ assertTestNotDone

#define assertTestNotDone (   name)    assertTestStatusInternal(name, isNotDone, kMessageNotDone)

Assert that test 'name' is not done.

Definition at line 79 of file MetaAssertMacros.h.

◆ assertTestNotDoneF

#define assertTestNotDoneF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isNotDone, kMessageNotDone)

Assert that test 'name' is not done.

Definition at line 172 of file MetaAssertMacros.h.

◆ assertTestNotExpire

#define assertTestNotExpire (   name)    assertTestStatusInternal(name, isNotExpired, kMessageNotExpired)

Assert that test 'name' has not timed out.

Definition at line 111 of file MetaAssertMacros.h.

◆ assertTestNotExpireF

#define assertTestNotExpireF (   testClass,
  name 
)
Value:
assertTestStatusInternalF(testClass, name, isNotExpired, \
kMessageNotExpired)
#define assertTestStatusInternalF(testClass, name, method, message)
Internal helper macro, shouldn't be called directly by users.

Assert that test 'name' has not timed out.

Definition at line 205 of file MetaAssertMacros.h.

◆ assertTestNotFail

#define assertTestNotFail (   name)    assertTestStatusInternal(name, isNotFailed, kMessageNotFailed)

Assert that test 'name' has not failed.

Definition at line 95 of file MetaAssertMacros.h.

◆ assertTestNotFailF

#define assertTestNotFailF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isNotFailed, kMessageNotFailed)

Assert that test 'name' has not failed.

Definition at line 188 of file MetaAssertMacros.h.

◆ assertTestNotPass

#define assertTestNotPass (   name)    assertTestStatusInternal(name, isNotPassed, kMessageNotPassed)

Assert that test 'name' has not passed.

Definition at line 87 of file MetaAssertMacros.h.

◆ assertTestNotPassF

#define assertTestNotPassF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isNotPassed, kMessageNotPassed)

Assert that test 'name' has not passed.

Definition at line 180 of file MetaAssertMacros.h.

◆ assertTestNotSkip

#define assertTestNotSkip (   name)    assertTestStatusInternal(name, isNotSkipped, kMessageNotSkipped)

Assert that test 'name' has not been skipped.

Definition at line 103 of file MetaAssertMacros.h.

◆ assertTestNotSkipF

#define assertTestNotSkipF (   testClass,
  name 
)
Value:
assertTestStatusInternalF(testClass, name, isNotSkipped, \
kMessageNotSkipped)
#define assertTestStatusInternalF(testClass, name, method, message)
Internal helper macro, shouldn't be called directly by users.

Assert that test 'name' has not been skipped.

Definition at line 196 of file MetaAssertMacros.h.

◆ assertTestPass

#define assertTestPass (   name)    assertTestStatusInternal(name, isPassed, kMessagePassed)

Assert that test 'name' has passed.

Definition at line 83 of file MetaAssertMacros.h.

◆ assertTestPassF

#define assertTestPassF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isPassed, kMessagePassed)

Assert that test 'name' has passed.

Definition at line 176 of file MetaAssertMacros.h.

◆ assertTestSkip

#define assertTestSkip (   name)    assertTestStatusInternal(name, isSkipped, kMessageSkipped)

Assert that test 'name' has been skipped.

Definition at line 99 of file MetaAssertMacros.h.

◆ assertTestSkipF

#define assertTestSkipF (   testClass,
  name 
)    assertTestStatusInternalF(testClass, name, isSkipped, kMessageSkipped)

Assert that test 'name' has been skipped.

Definition at line 192 of file MetaAssertMacros.h.

◆ assertTestStatusInternal

#define assertTestStatusInternal (   name,
  method,
  message 
)
Value:
do {\
if (!assertionTestStatus(\
__FILE__,__LINE__,#name,FPSTR(message),test_##name##_instance.method()))\
return;\
} while (false)

Internal helper macro, shouldn't be called directly by users.

Definition at line 115 of file MetaAssertMacros.h.

◆ assertTestStatusInternalF

#define assertTestStatusInternalF (   testClass,
  name,
  method,
  message 
)
Value:
do {\
if (!assertionTestStatus(\
__FILE__,__LINE__,#name,FPSTR(message),\
testClass##_##name##_instance.method()))\
return;\
} while (false)

Internal helper macro, shouldn't be called directly by users.

Definition at line 210 of file MetaAssertMacros.h.

◆ checkTestDone

#define checkTestDone (   name)    (test_##name##_instance.isDone())

Return true if test 'name' is done.

Definition at line 42 of file MetaAssertMacros.h.

◆ checkTestDoneF

#define checkTestDoneF (   testClass,
  name 
)    (testClass##_##name##_instance.isDone())

Return true if test 'name' is done.

Definition at line 125 of file MetaAssertMacros.h.

◆ checkTestExpire

#define checkTestExpire (   name)    (test_##name##_instance.isExpired())

Return true if test 'name' has timed out.

Definition at line 66 of file MetaAssertMacros.h.

◆ checkTestExpireF

#define checkTestExpireF (   testClass,
  name 
)    (testClass##_##name##_instance.isExpired())

Return true if test 'name' has timed out.

Definition at line 157 of file MetaAssertMacros.h.

◆ checkTestFail

#define checkTestFail (   name)    (test_##name##_instance.isFailed())

Return true if test 'name' has failed.

Definition at line 54 of file MetaAssertMacros.h.

◆ checkTestFailF

#define checkTestFailF (   testClass,
  name 
)    (testClass##_##name##_instance.isFailed())

Return true if test 'name' has failed.

Definition at line 141 of file MetaAssertMacros.h.

◆ checkTestNotDone

#define checkTestNotDone (   name)    (test_##name##_instance.isNotDone())

Return true if test 'name' is not done.

Definition at line 45 of file MetaAssertMacros.h.

◆ checkTestNotDoneF

#define checkTestNotDoneF (   testClass,
  name 
)    (testClass##_##name##_instance.isNotDone())

Return true if test 'name' is not done.

Definition at line 129 of file MetaAssertMacros.h.

◆ checkTestNotExpire

#define checkTestNotExpire (   name)    (test_##name##_instance.isNotExpired())

Return true if test 'name' has not timed out.

Definition at line 69 of file MetaAssertMacros.h.

◆ checkTestNotExpireF

#define checkTestNotExpireF (   testClass,
  name 
)    (testClass##_##name##_instance.isNotExpired())

Return true if test 'name' has not timed out.

Definition at line 161 of file MetaAssertMacros.h.

◆ checkTestNotFail

#define checkTestNotFail (   name)    (test_##name##_instance.isNotFailed())

Return true if test 'name' has not failed.

Definition at line 57 of file MetaAssertMacros.h.

◆ checkTestNotFailF

#define checkTestNotFailF (   testClass,
  name 
)    (testClass##_##name##_instance.isNotFailed())

Return true if test 'name' has not failed.

Definition at line 145 of file MetaAssertMacros.h.

◆ checkTestNotPass

#define checkTestNotPass (   name)    (test_##name##_instance.isNotPassed())

Return true if test 'name' has not passed.

Definition at line 51 of file MetaAssertMacros.h.

◆ checkTestNotPassF

#define checkTestNotPassF (   testClass,
  name 
)    (testClass##_##name##_instance.isNotPassed())

Return true if test 'name' has not passed.

Definition at line 137 of file MetaAssertMacros.h.

◆ checkTestNotSkip

#define checkTestNotSkip (   name)    (test_##name##_instance.isNotSkipped())

Return true if test 'name' has not been skipped.

Definition at line 63 of file MetaAssertMacros.h.

◆ checkTestNotSkipF

#define checkTestNotSkipF (   testClass,
  name 
)    (testClass##_##name##_instance.isNotSkipped())

Return true if test 'name' has not been skipped.

Definition at line 153 of file MetaAssertMacros.h.

◆ checkTestPass

#define checkTestPass (   name)    (test_##name##_instance.isPassed())

Return true if test 'name' has passed.

Definition at line 48 of file MetaAssertMacros.h.

◆ checkTestPassF

#define checkTestPassF (   testClass,
  name 
)    (testClass##_##name##_instance.isPassed())

Return true if test 'name' has passed.

Definition at line 133 of file MetaAssertMacros.h.

◆ checkTestSkip

#define checkTestSkip (   name)    (test_##name##_instance.isSkipped())

Return true if test 'name' has been skipped.

Definition at line 60 of file MetaAssertMacros.h.

◆ checkTestSkipF

#define checkTestSkipF (   testClass,
  name 
)    (testClass##_##name##_instance.isSkipped())

Return true if test 'name' has been skipped.

Definition at line 149 of file MetaAssertMacros.h.