Changeset 39457 for trunk/Ohana/src/libtap/include/tap_ohana.h
- Timestamp:
- Mar 11, 2016, 10:23:42 PM (10 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/libtap/include/tap_ohana.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/ohana.20160226 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/libtap/include/tap_ohana.h
r10312 r39457 28 28 and requires the caller to add the final comma if they've ommitted 29 29 the optional arguments */ 30 #ifdef __GNUC__ 30 #if __STDC_VERSION__ >= 199901L /* we are C99 */ 31 # define ok(e, ...) ((e) ? \ 32 _gen_result(1, __func__, __FILE__, __LINE__, \ 33 __VA_ARGS__) : \ 34 _gen_result(0, __func__, __FILE__, __LINE__, \ 35 __VA_ARGS__)) 36 37 # define ok1(e) ((e) ? \ 38 _gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \ 39 _gen_result(0, __func__, __FILE__, __LINE__, "%s", #e)) 40 41 # define pass(...) ok(1, __VA_ARGS__); 42 # define fail(...) ok(0, __VA_ARGS__); 43 44 # define skip_start(test, n, ...) \ 45 do { \ 46 if((test)) { \ 47 skip(n, __VA_ARGS__); \ 48 continue; \ 49 } 50 #elif __GNUC__ /* we are at least gcc */ 31 51 # define ok(e, test, ...) ((e) ? \ 32 52 _gen_result(1, __func__, __FILE__, __LINE__, \ … … 48 68 continue; \ 49 69 } 50 #elif __STDC_VERSION__ >= 199901L /* __GNUC__ */ 51 # define ok(e, ...) ((e) ? \ 52 _gen_result(1, __func__, __FILE__, __LINE__, \ 53 __VA_ARGS__) : \ 54 _gen_result(0, __func__, __FILE__, __LINE__, \ 55 __VA_ARGS__)) 56 57 # define ok1(e) ((e) ? \ 58 _gen_result(1, __func__, __FILE__, __LINE__, "%s", #e) : \ 59 _gen_result(0, __func__, __FILE__, __LINE__, "%s", #e)) 60 61 # define pass(...) ok(1, __VA_ARGS__); 62 # define fail(...) ok(0, __VA_ARGS__); 63 64 # define skip_start(test, n, ...) \ 65 do { \ 66 if((test)) { \ 67 skip(n, __VA_ARGS__); \ 68 continue; \ 69 } 70 #else /* __STDC_VERSION__ */ 70 #else /* neither __STDC_VERSION__ nor gcc: */ 71 71 # error "Needs gcc or C99 compiler for variadic macros." 72 72 #endif /* __STDC_VERSION__ */
Note:
See TracChangeset
for help on using the changeset viewer.
