Back to home page

Enduro/X

 
 

    


0001 #ifndef UNIT_HEADER
0002 #define UNIT_HEADER
0003 
0004 #ifdef __cplusplus
0005 namespace cgreen {
0006     extern "C" {
0007 #endif
0008 
0009 #include "internal/unit_implementation.h"
0010 
0011 /* BDD style: Describe the Subject Under Test, or context, by name */
0012 #define Describe(subject) DescribeImplementation(subject)
0013 
0014 /* BDD style: Run this before any tests for that SUT or in that context */
0015 #define BeforeEach(subject) BeforeEachImplementation(subject)
0016 
0017 /* BDD style: Run this after any tests for that SUT or in that context */
0018 #define AfterEach(subject) AfterEachImplementation(subject)
0019 
0020 /* NOTE if you use BDD style all three of the above are required */
0021 /* Then you must also use the BDD style Ensure(subject, test) */
0022 
0023 /* TDD Style: Ensure(testname) {implementation} */
0024 /* BDD Style: Ensure(subject, testname) {implementation} */
0025 #define Ensure(...) Ensure_NARG(__VA_ARGS__)(__VA_ARGS__)
0026 
0027 #ifdef __cplusplus
0028     }
0029 }
0030 #endif
0031 
0032 #endif