PicoTest
A minimalist unit testing framework for C programs
Loading...
Searching...
No Matches
picotest.h
Go to the documentation of this file.
1
47
48#ifndef _PICOTEST
49#define _PICOTEST
50
51#include <setjmp.h>
52#include <stdarg.h>
53#include <string.h>
54
55#if defined(_MSC_VER)
62#define _PICOTEST_PARENS
63#endif /* defined(_MSC_VER) */
64
69
77
78#define PICOTEST_VERSION "1.4.2"
79#define PICOTEST_VERSION_MAJOR 1
80#define PICOTEST_VERSION_MINOR 4
81#define PICOTEST_VERSION_PATCH 2
82
84
89
104typedef int(PicoTestProc)(const char *cond);
105
109typedef struct PicoTestMetadata {
110 const char *name;
111 const char *file;
112 int line;
115 const struct PicoTestMetadata *
119
127#define PICOTEST_EXTERN(_testName) \
128 extern PicoTestProc _testName; \
129 extern PicoTestMetadata _PICOTEST_METADATA(_testName);
130
141#define PICOTEST_METADATA(_testName) &_PICOTEST_METADATA(_testName)
142
144#define _PICOTEST_METADATA(_testName) _testName##_metadata
145#define _PICOTEST_TEST_DECLARE(_testName, _nbSubtests, _subtests) \
146 PicoTestProc _testName; \
147 PicoTestMetadata _PICOTEST_METADATA(_testName) = { \
148 _PICOTEST_STRINGIZE(_testName), \
149 __FILE__, \
150 __LINE__, \
151 _testName, \
152 _nbSubtests, \
153 (const struct PicoTestMetadata **)_subtests};
155
157
165
190
216 const char *testName,
217 const char *cond);
218
229static PicoTestFilterResult _picoTest_filterByName(PicoTestProc *test,
230 const char *testName,
231 const char *cond) {
232 return (strcmp(testName, cond) == 0 ? PICOTEST_FILTER_PASS
234}
235
245#define PICOTEST_FILTER_DEFAULT _picoTest_filterByName
246
271#define PICOTEST_FILTER PICOTEST_FILTER_DEFAULT
272
274
283
299typedef void(PicoTestTraverseProc)(const char *name, int nb);
300
317#define PICOTEST_TRAVERSE(_testName, _proc) \
318 _picoTest_traverse(PICOTEST_METADATA(_testName), _proc)
319
330static void _picoTest_traverse(const PicoTestMetadata *metadata,
331 PicoTestTraverseProc *proc) {
332 const PicoTestMetadata **subtest = metadata->subtests;
333 proc(metadata->name, metadata->nbSubtests);
334 if (metadata->nbSubtests) {
335 for (; *subtest; subtest++) {
336 _picoTest_traverse(*subtest, proc);
337 }
338 }
339}
340
354
366typedef void(PicoTestVisitProc)(const PicoTestMetadata *metadata,
367 PicoTestVisitStep step);
368
383#define PICOTEST_VISIT(_testName, _proc) \
384 _picoTest_visit(PICOTEST_METADATA(_testName), _proc)
385
396static void _picoTest_visit(const PicoTestMetadata *metadata,
397 PicoTestVisitProc *proc) {
398 const PicoTestMetadata **subtest = metadata->subtests;
399 proc(metadata, PICOTEST_VISIT_ENTER);
400 if (metadata->nbSubtests) {
401 for (; *subtest; subtest++) {
402 _picoTest_visit(*subtest, proc);
403 }
404 }
405 proc(metadata, PICOTEST_VISIT_LEAVE);
406}
407
409
417
438typedef void(PicoTestFailureLoggerProc)(const char *file, int line,
439 const char *type, const char *test,
440 const char *msg, va_list args);
441
449static void _picoTest_logFailure(const char *file, int line, const char *type,
450 const char *test, const char *msg,
451 va_list args) {}
452
459#define PICOTEST_FAILURE_LOGGER_DEFAULT _picoTest_logFailure
460
480#define PICOTEST_FAILURE_LOGGER PICOTEST_FAILURE_LOGGER_DEFAULT
481
483
491
496
519#if defined(_PICOTEST_PARENS)
520#define PICOTEST_CASE(...) \
521 _PICOTEST_CONCATENATE(_PICOTEST_CASE_, _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
522 _PICOTEST_PARENS(__VA_ARGS__)
523#else
524#define PICOTEST_CASE(...) \
525 _PICOTEST_CONCATENATE(_PICOTEST_CASE_, _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
526 (__VA_ARGS__)
527#endif /* defined(_PICOTEST_PARENS) */
528
530#define _PICOTEST_CASE_DECLARE(_testName) \
531 _PICOTEST_TEST_DECLARE(_testName, 0, NULL); \
532 static int _testName##_testCaseRunner(void); \
533 int _testName(const char *cond) { \
534 int fail = 0; \
535 PicoTestFilterResult filterResult = \
536 (cond == NULL) \
537 ? PICOTEST_FILTER_PASS \
538 : PICOTEST_FILTER(_testName, _PICOTEST_STRINGIZE(_testName), \
539 cond); \
540 switch (filterResult) { \
541 case PICOTEST_FILTER_PASS: \
542 case PICOTEST_FILTER_PASS_PROPAGATE: \
543 fail += _testName##_testCaseRunner(); \
544 break; \
545 default:; \
546 } \
547 return fail; \
548 }
549
550#define _PICOTEST_CASE_RUNNER_BEGIN(_testName) \
551 static int _testName##_testCaseRunner() { \
552 int abort; \
553 jmp_buf failureEnv; \
554 jmp_buf *oldEnv = _picoTest_failureEnv; \
555 int fail, oldFail = _picoTest_fail; \
556 _picoTest_failureEnv = &failureEnv; \
557 _picoTest_fail = 0; \
558 PICOTEST_CASE_ENTER(_PICOTEST_STRINGIZE(_testName)); \
559 abort = setjmp(failureEnv);
560
561#define _PICOTEST_CASE_RUNNER_END(_testName) \
562 fail = _picoTest_fail; \
563 PICOTEST_CASE_LEAVE(_PICOTEST_STRINGIZE(_testName), fail); \
564 _picoTest_failureEnv = oldEnv; \
565 _picoTest_fail = oldFail; \
566 return fail; \
567 }
568
569#define _PICOTEST_CASE_1(_testName) \
570 _PICOTEST_CASE_DECLARE(_testName) \
571 static void _testName##_testCase(void); \
572 _PICOTEST_CASE_RUNNER_BEGIN(_testName) \
573 if (!abort) { \
574 _testName##_testCase(); \
575 } \
576 _PICOTEST_CASE_RUNNER_END(_testName) \
577 static void _testName##_testCase(void)
578
579#define _PICOTEST_CASE_2(_testName, _fixtureName) \
580 _PICOTEST_CASE_DECLARE(_testName) \
581 static void _testName##_testCase(void); \
582 _PICOTEST_CASE_RUNNER_BEGIN(_testName) \
583 if (!abort) { \
584 _PICOTEST_FIXTURE_CALL_SETUP(_fixtureName, _testName, NULL); \
585 _testName##_testCase(); \
586 } \
587 _PICOTEST_FIXTURE_CALL_TEARDOWN(_fixtureName, _testName, NULL, \
588 _picoTest_fail); \
589 _PICOTEST_CASE_RUNNER_END(_testName) \
590 static void _testName##_testCase()
591
592#define _PICOTEST_CASE_3(_testName, _fixtureName, _context) \
593 _PICOTEST_CASE_DECLARE(_testName) \
594 static void _testName##_testCase(struct _fixtureName##_Context *); \
595 _PICOTEST_CASE_RUNNER_BEGIN(_testName) { \
596 struct _fixtureName##_Context context; \
597 if (!abort) { \
598 _PICOTEST_FIXTURE_CALL_SETUP(_fixtureName, _testName, &context); \
599 _testName##_testCase(&context); \
600 } \
601 _PICOTEST_FIXTURE_CALL_TEARDOWN(_fixtureName, _testName, &context, \
602 _picoTest_fail); \
603 } \
604 _PICOTEST_CASE_RUNNER_END(_testName) \
605 static void _testName##_testCase(struct _fixtureName##_Context *_context)
607
609
617
633typedef void(PicoTestCaseEnterProc)(const char *testName);
634
641#define PICOTEST_CASE_ENTER_DEFAULT(testName)
642
663#define PICOTEST_CASE_ENTER PICOTEST_CASE_ENTER_DEFAULT
664
681typedef void(PicoTestCaseLeaveProc)(const char *testName, int fail);
682
689#define PICOTEST_CASE_LEAVE_DEFAULT(testName, fail)
690
711#define PICOTEST_CASE_LEAVE PICOTEST_CASE_LEAVE_DEFAULT
712
714
716
723
728
751#define PICOTEST_ASSERT(x, /* msg, */...) \
752 { _PICOTEST_ASSERT(x, #x, ##__VA_ARGS__); }
753
755#define _PICOTEST_ASSERT(x, ...) \
756 PICOTEST_ASSERT_BEFORE("ASSERT", #x); \
757 { \
758 int _PICOTEST_FAIL = !(x); \
759 PICOTEST_ASSERT_AFTER("ASSERT", #x, _PICOTEST_FAIL); \
760 if (_PICOTEST_FAIL) { \
761 PICOTEST_FAILURE("ASSERT", ##__VA_ARGS__); \
762 PICOTEST_ABORT(); \
763 } \
764 }
766
788#define PICOTEST_VERIFY(x, /* msg, */...) \
789 { _PICOTEST_VERIFY(x, #x, ##__VA_ARGS__); }
790
792#define _PICOTEST_VERIFY(x, ...) \
793 PICOTEST_ASSERT_BEFORE("VERIFY", #x); \
794 { \
795 int _PICOTEST_FAIL = !(x); \
796 PICOTEST_ASSERT_AFTER("VERIFY", #x, _PICOTEST_FAIL); \
797 if (_PICOTEST_FAIL) { \
798 PICOTEST_FAILURE("VERIFY", ##__VA_ARGS__); \
799 } \
800 }
802
816#define PICOTEST_FAILURE(type, test, /* msg, */...) \
817 _PICOTEST_FAILURE(type, test, ##__VA_ARGS__)
818
820#define _PICOTEST_FAILURE(type, ...) \
821 _picoTest_fail++; \
822 _picoTest_assertFailed(PICOTEST_FAILURE_LOGGER, __FILE__, __LINE__, type, \
823 _PICOTEST_ARGCOUNT(__VA_ARGS__), __VA_ARGS__); \
824
825
831static int _picoTest_fail = 0;
832
839static jmp_buf *_picoTest_failureEnv = NULL;
840
848#define PICOTEST_ABORT() longjmp(*_picoTest_failureEnv, 1)
849
864static void _picoTest_assertFailed(PicoTestFailureLoggerProc *proc,
865 const char *file, int line, const char *type,
866 int count, const char *test, ...) {
867 if (count > 1) {
868 /* Extra args after **test** */
869 va_list args;
870 const char *msg;
871 va_start(args, test);
872 msg = va_arg(args, const char *);
873 proc(file, line, type, test, msg, args);
874 } else {
875 proc(file, line, type, test, NULL, NULL);
876 }
877}
878
880
888
905typedef void(PicoTestAssertBeforeProc)(const char *type, const char *test);
906
913#define PICOTEST_ASSERT_BEFORE_DEFAULT(type, test)
914
935#define PICOTEST_ASSERT_BEFORE PICOTEST_ASSERT_BEFORE_DEFAULT
936
954typedef void(PicoTestAssertAfterProc)(const char *type, const char *test,
955 int fail);
956
963#define PICOTEST_ASSERT_AFTER_DEFAULT(type, test, fail)
964
985#define PICOTEST_ASSERT_AFTER PICOTEST_ASSERT_AFTER_DEFAULT
986
988
990
999
1004
1024#define PICOTEST_FIXTURE_CONTEXT(_fixtureName) struct _fixtureName##_Context
1025
1054#if defined(_PICOTEST_PARENS)
1055#define PICOTEST_FIXTURE_SETUP(...) \
1056 _PICOTEST_CONCATENATE(_PICOTEST_FIXTURE_SETUP_, \
1057 _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
1058 _PICOTEST_PARENS(__VA_ARGS__)
1059#else
1060#define PICOTEST_FIXTURE_SETUP(...) \
1061 _PICOTEST_CONCATENATE(_PICOTEST_FIXTURE_SETUP_, \
1062 _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
1063 (__VA_ARGS__)
1064#endif /* defined(_PICOTEST_PARENS) */
1065
1067#define _PICOTEST_FIXTURE_SETUP_1(_fixtureName) \
1068 static void _fixtureName##_setup(void *_fixtureName##_DUMMY)
1069
1070#define _PICOTEST_FIXTURE_SETUP_2(_fixtureName, _context) \
1071 static void _fixtureName##_setup(struct _fixtureName##_Context *_context)
1072
1073#define _PICOTEST_FIXTURE_CALL_SETUP(_fixtureName, _testName, context) \
1074 PICOTEST_FIXTURE_BEFORE_SETUP(_PICOTEST_STRINGIZE(_fixtureName), \
1075 _PICOTEST_STRINGIZE(_testName)); \
1076 _fixtureName##_setup(context); \
1077 PICOTEST_FIXTURE_AFTER_SETUP(_PICOTEST_STRINGIZE(_fixtureName), \
1078 _PICOTEST_STRINGIZE(_testName));
1080
1109#if defined(_PICOTEST_PARENS)
1110#define PICOTEST_FIXTURE_TEARDOWN(...) \
1111 _PICOTEST_CONCATENATE(_PICOTEST_FIXTURE_TEARDOWN_, \
1112 _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
1113 _PICOTEST_PARENS(__VA_ARGS__)
1114#else
1115#define PICOTEST_FIXTURE_TEARDOWN(...) \
1116 _PICOTEST_CONCATENATE(_PICOTEST_FIXTURE_TEARDOWN_, \
1117 _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
1118 (__VA_ARGS__)
1119#endif /* defined(_PICOTEST_PARENS) */
1120
1122#define _PICOTEST_FIXTURE_TEARDOWN_1(_fixtureName) \
1123 static void _fixtureName##_teardown(int PICOTEST_FAIL, \
1124 void *_fixtureName##_DUMMY)
1125
1126#define _PICOTEST_FIXTURE_TEARDOWN_2(_fixtureName, _context) \
1127 static void _fixtureName##_teardown( \
1128 int PICOTEST_FAIL, struct _fixtureName##_Context *_context)
1129
1130#define _PICOTEST_FIXTURE_CALL_TEARDOWN(_fixtureName, _testName, context, \
1131 fail) \
1132 PICOTEST_FIXTURE_BEFORE_TEARDOWN(_PICOTEST_STRINGIZE(_fixtureName), \
1133 _PICOTEST_STRINGIZE(_testName), fail); \
1134 _fixtureName##_teardown(fail, context); \
1135 PICOTEST_FIXTURE_AFTER_TEARDOWN(_PICOTEST_STRINGIZE(_fixtureName), \
1136 _PICOTEST_STRINGIZE(_testName), fail); \
1137
1138
1140
1148
1165typedef void(PicoTestFixtureBeforeSetupProc)(const char *fixtureName,
1166 const char *testName);
1167
1174#define PICOTEST_FIXTURE_BEFORE_SETUP_DEFAULT(fixtureName, testName)
1175
1196#define PICOTEST_FIXTURE_BEFORE_SETUP PICOTEST_FIXTURE_BEFORE_SETUP_DEFAULT
1197
1214typedef void(PicoTestFixtureAfterSetupProc)(const char *fixtureName,
1215 const char *testName);
1216
1223#define PICOTEST_FIXTURE_AFTER_SETUP_DEFAULT(fixtureName, testName)
1224
1245#define PICOTEST_FIXTURE_AFTER_SETUP PICOTEST_FIXTURE_AFTER_SETUP_DEFAULT
1246
1264typedef void(PicoTestFixtureBeforeTeardownProc)(const char *fixtureName,
1265 const char *testName, int fail);
1266
1273#define PICOTEST_FIXTURE_BEFORE_TEARDOWN_DEFAULT(fixtureName, testName, fail)
1274
1295#define PICOTEST_FIXTURE_BEFORE_TEARDOWN \
1296 PICOTEST_FIXTURE_BEFORE_TEARDOWN_DEFAULT
1297
1315typedef void(PicoTestFixtureAfterTeardownProc)(const char *fixtureName,
1316 const char *testName, int fail);
1317
1324#define PICOTEST_FIXTURE_AFTER_TEARDOWN_DEFAULT(fixtureName, testName, fail)
1325
1346#define PICOTEST_FIXTURE_AFTER_TEARDOWN PICOTEST_FIXTURE_AFTER_TEARDOWN_DEFAULT
1347
1349
1351
1359
1364
1387#define PICOTEST_SUITE(_suiteName, ...) \
1388 _PICOTEST_FOR_EACH(PICOTEST_EXTERN, __VA_ARGS__) \
1389 static PicoTestMetadata *_suiteName##_subtests[] = {_PICOTEST_FOR_EACH( \
1390 _PICOTEST_SUITE_ENUMERATE_SUBTEST, __VA_ARGS__) NULL}; \
1391 _PICOTEST_TEST_DECLARE(_suiteName, _PICOTEST_ARGCOUNT(__VA_ARGS__), \
1392 _suiteName##_subtests); \
1393 static int _suiteName##_testSuiteRunner(const char *cond) { \
1394 const int nb = _PICOTEST_ARGCOUNT(__VA_ARGS__); \
1395 PicoTestMetadata **subtest = _suiteName##_subtests; \
1396 int fail = 0; \
1397 PICOTEST_SUITE_ENTER(_PICOTEST_STRINGIZE(_suiteName), nb); \
1398 for (; *subtest; subtest++) { \
1399 const int index = (int)(subtest - _suiteName##_subtests); \
1400 int sfail = 0; \
1401 PICOTEST_SUITE_BEFORE_SUBTEST(_PICOTEST_STRINGIZE(_suiteName), nb, \
1402 fail, index, (*subtest)->name); \
1403 sfail = (*subtest)->test(cond); \
1404 fail += sfail; \
1405 PICOTEST_SUITE_AFTER_SUBTEST(_PICOTEST_STRINGIZE(_suiteName), nb, \
1406 fail, index, (*subtest)->name, \
1407 sfail); \
1408 } \
1409 PICOTEST_SUITE_LEAVE(_PICOTEST_STRINGIZE(_suiteName), nb, fail); \
1410 return fail; \
1411 } \
1412 int _suiteName(const char *cond) { \
1413 int fail = 0; \
1414 PicoTestFilterResult filterResult = \
1415 (cond == NULL) \
1416 ? PICOTEST_FILTER_PASS \
1417 : PICOTEST_FILTER(_suiteName, _PICOTEST_STRINGIZE(_suiteName), \
1418 cond); \
1419 switch (filterResult) { \
1420 case PICOTEST_FILTER_PASS: \
1421 cond = NULL; \
1422 case PICOTEST_FILTER_PASS_PROPAGATE: \
1423 fail += _suiteName##_testSuiteRunner(cond); \
1424 break; \
1425 case PICOTEST_FILTER_SKIP: \
1426 break; \
1427 case PICOTEST_FILTER_SKIP_PROPAGATE: { \
1428 PicoTestMetadata **subtest = _suiteName##_subtests; \
1429 for (; *subtest; subtest++) { \
1430 fail += (*subtest)->test(cond); \
1431 } \
1432 } break; \
1433 } \
1434 return fail; \
1435 }
1436
1438#define _PICOTEST_SUITE_ENUMERATE_SUBTEST(_testName) \
1439 PICOTEST_METADATA(_testName),
1441
1443
1452
1469typedef void(PicoTestSuiteEnterProc)(const char *suiteName, int nb);
1470
1477#define PICOTEST_SUITE_ENTER_DEFAULT(suiteName, nb)
1478
1499#define PICOTEST_SUITE_ENTER PICOTEST_SUITE_ENTER_DEFAULT
1500
1517typedef void(PicoTestSuiteLeaveProc)(const char *suiteName, int nb, int fail);
1518
1525#define PICOTEST_SUITE_LEAVE_DEFAULT(suiteName, nb, fail)
1526
1549#define PICOTEST_SUITE_LEAVE PICOTEST_SUITE_LEAVE_DEFAULT
1550
1571typedef void(PicoTestSuiteBeforeSubtestProc)(const char *suiteName, int nb,
1572 int fail, int index,
1573 const char *testName);
1574
1581#define PICOTEST_SUITE_BEFORE_SUBTEST_DEFAULT(suiteName, nb, fail, index, \
1582 testName)
1583
1604#define PICOTEST_SUITE_BEFORE_SUBTEST PICOTEST_SUITE_BEFORE_SUBTEST_DEFAULT
1605
1628typedef void(PicoTestSuiteAfterSubtestProc)(const char *suiteName, int nb,
1629 int fail, int index,
1630 const char *testName, int sfail);
1631
1638#define PICOTEST_SUITE_AFTER_SUBTEST_DEFAULT(suiteName, nb, fail, index, \
1639 testName, sfail)
1640
1661#define PICOTEST_SUITE_AFTER_SUBTEST PICOTEST_SUITE_AFTER_SUBTEST_DEFAULT
1662
1664
1666
1668
1676
1681
1685#define _PICOTEST_STRINGIZE(arg) #arg
1686
1690#define _PICOTEST_CONCATENATE(arg1, arg2) _PICOTEST_CONCATENATE1(arg1, arg2)
1691
1693#define _PICOTEST_CONCATENATE1(arg1, arg2) _PICOTEST_CONCATENATE2(arg1, arg2)
1694#define _PICOTEST_CONCATENATE2(arg1, arg2) arg1##arg2
1696
1698
1708
1718#if defined(_PICOTEST_PARENS)
1719#define _PICOTEST_ARGCOUNT(...) \
1720 _PICOTEST_LASTARG _PICOTEST_PARENS( \
1721 __VA_ARGS__, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, \
1722 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, \
1723 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, \
1724 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
1725#else
1726#define _PICOTEST_ARGCOUNT(...) \
1727 _PICOTEST_LASTARG(__VA_ARGS__, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, \
1728 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, \
1729 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, \
1730 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \
1731 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
1732#endif /* defined(_PICOTEST_PARENS) */
1734
1736#define _PICOTEST_LASTARG( \
1737 _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, \
1738 _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, \
1739 _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, \
1740 _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, \
1741 _62, _63, N, ...) \
1742 N
1744
1755#if defined(_PICOTEST_PARENS)
1756#define _PICOTEST_FOR_EACH(what, ...) \
1757 _PICOTEST_CONCATENATE(_PICOTEST_FOR_EACH_, \
1758 _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
1759 _PICOTEST_PARENS(what, __VA_ARGS__)
1760#else
1761#define _PICOTEST_FOR_EACH(what, ...) \
1762 _PICOTEST_CONCATENATE(_PICOTEST_FOR_EACH_, \
1763 _PICOTEST_ARGCOUNT(__VA_ARGS__)) \
1764 (what, __VA_ARGS__)
1765#endif /* defined(_PICOTEST_PARENS) */
1767
1769#if defined(_PICOTEST_PARENS)
1770#define _PICOTEST_FOR_EACH_1(what, x) what(x)
1771#define _PICOTEST_FOR_EACH_2(what, x, ...) \
1772 what(x) _PICOTEST_FOR_EACH_1 _PICOTEST_PARENS(what, __VA_ARGS__)
1773#define _PICOTEST_FOR_EACH_3(what, x, ...) \
1774 what(x) _PICOTEST_FOR_EACH_2 _PICOTEST_PARENS(what, __VA_ARGS__)
1775#define _PICOTEST_FOR_EACH_4(what, x, ...) \
1776 what(x) _PICOTEST_FOR_EACH_3 _PICOTEST_PARENS(what, __VA_ARGS__)
1777#define _PICOTEST_FOR_EACH_5(what, x, ...) \
1778 what(x) _PICOTEST_FOR_EACH_4 _PICOTEST_PARENS(what, __VA_ARGS__)
1779#define _PICOTEST_FOR_EACH_6(what, x, ...) \
1780 what(x) _PICOTEST_FOR_EACH_5 _PICOTEST_PARENS(what, __VA_ARGS__)
1781#define _PICOTEST_FOR_EACH_7(what, x, ...) \
1782 what(x) _PICOTEST_FOR_EACH_6 _PICOTEST_PARENS(what, __VA_ARGS__)
1783#define _PICOTEST_FOR_EACH_8(what, x, ...) \
1784 what(x) _PICOTEST_FOR_EACH_7 _PICOTEST_PARENS(what, __VA_ARGS__)
1785#define _PICOTEST_FOR_EACH_9(what, x, ...) \
1786 what(x) _PICOTEST_FOR_EACH_8 _PICOTEST_PARENS(what, __VA_ARGS__)
1787#define _PICOTEST_FOR_EACH_10(what, x, ...) \
1788 what(x) _PICOTEST_FOR_EACH_9 _PICOTEST_PARENS(what, __VA_ARGS__)
1789#define _PICOTEST_FOR_EACH_11(what, x, ...) \
1790 what(x) _PICOTEST_FOR_EACH_10 _PICOTEST_PARENS(what, __VA_ARGS__)
1791#define _PICOTEST_FOR_EACH_12(what, x, ...) \
1792 what(x) _PICOTEST_FOR_EACH_11 _PICOTEST_PARENS(what, __VA_ARGS__)
1793#define _PICOTEST_FOR_EACH_13(what, x, ...) \
1794 what(x) _PICOTEST_FOR_EACH_12 _PICOTEST_PARENS(what, __VA_ARGS__)
1795#define _PICOTEST_FOR_EACH_14(what, x, ...) \
1796 what(x) _PICOTEST_FOR_EACH_13 _PICOTEST_PARENS(what, __VA_ARGS__)
1797#define _PICOTEST_FOR_EACH_15(what, x, ...) \
1798 what(x) _PICOTEST_FOR_EACH_14 _PICOTEST_PARENS(what, __VA_ARGS__)
1799#define _PICOTEST_FOR_EACH_16(what, x, ...) \
1800 what(x) _PICOTEST_FOR_EACH_15 _PICOTEST_PARENS(what, __VA_ARGS__)
1801#define _PICOTEST_FOR_EACH_17(what, x, ...) \
1802 what(x) _PICOTEST_FOR_EACH_16 _PICOTEST_PARENS(what, __VA_ARGS__)
1803#define _PICOTEST_FOR_EACH_18(what, x, ...) \
1804 what(x) _PICOTEST_FOR_EACH_17 _PICOTEST_PARENS(what, __VA_ARGS__)
1805#define _PICOTEST_FOR_EACH_19(what, x, ...) \
1806 what(x) _PICOTEST_FOR_EACH_18 _PICOTEST_PARENS(what, __VA_ARGS__)
1807#define _PICOTEST_FOR_EACH_20(what, x, ...) \
1808 what(x) _PICOTEST_FOR_EACH_19 _PICOTEST_PARENS(what, __VA_ARGS__)
1809#define _PICOTEST_FOR_EACH_21(what, x, ...) \
1810 what(x) _PICOTEST_FOR_EACH_20 _PICOTEST_PARENS(what, __VA_ARGS__)
1811#define _PICOTEST_FOR_EACH_22(what, x, ...) \
1812 what(x) _PICOTEST_FOR_EACH_21 _PICOTEST_PARENS(what, __VA_ARGS__)
1813#define _PICOTEST_FOR_EACH_23(what, x, ...) \
1814 what(x) _PICOTEST_FOR_EACH_22 _PICOTEST_PARENS(what, __VA_ARGS__)
1815#define _PICOTEST_FOR_EACH_24(what, x, ...) \
1816 what(x) _PICOTEST_FOR_EACH_23 _PICOTEST_PARENS(what, __VA_ARGS__)
1817#define _PICOTEST_FOR_EACH_25(what, x, ...) \
1818 what(x) _PICOTEST_FOR_EACH_24 _PICOTEST_PARENS(what, __VA_ARGS__)
1819#define _PICOTEST_FOR_EACH_26(what, x, ...) \
1820 what(x) _PICOTEST_FOR_EACH_25 _PICOTEST_PARENS(what, __VA_ARGS__)
1821#define _PICOTEST_FOR_EACH_27(what, x, ...) \
1822 what(x) _PICOTEST_FOR_EACH_26 _PICOTEST_PARENS(what, __VA_ARGS__)
1823#define _PICOTEST_FOR_EACH_28(what, x, ...) \
1824 what(x) _PICOTEST_FOR_EACH_27 _PICOTEST_PARENS(what, __VA_ARGS__)
1825#define _PICOTEST_FOR_EACH_29(what, x, ...) \
1826 what(x) _PICOTEST_FOR_EACH_28 _PICOTEST_PARENS(what, __VA_ARGS__)
1827#define _PICOTEST_FOR_EACH_30(what, x, ...) \
1828 what(x) _PICOTEST_FOR_EACH_29 _PICOTEST_PARENS(what, __VA_ARGS__)
1829#define _PICOTEST_FOR_EACH_31(what, x, ...) \
1830 what(x) _PICOTEST_FOR_EACH_30 _PICOTEST_PARENS(what, __VA_ARGS__)
1831#define _PICOTEST_FOR_EACH_32(what, x, ...) \
1832 what(x) _PICOTEST_FOR_EACH_31 _PICOTEST_PARENS(what, __VA_ARGS__)
1833#define _PICOTEST_FOR_EACH_33(what, x, ...) \
1834 what(x) _PICOTEST_FOR_EACH_32 _PICOTEST_PARENS(what, __VA_ARGS__)
1835#define _PICOTEST_FOR_EACH_34(what, x, ...) \
1836 what(x) _PICOTEST_FOR_EACH_33 _PICOTEST_PARENS(what, __VA_ARGS__)
1837#define _PICOTEST_FOR_EACH_35(what, x, ...) \
1838 what(x) _PICOTEST_FOR_EACH_34 _PICOTEST_PARENS(what, __VA_ARGS__)
1839#define _PICOTEST_FOR_EACH_36(what, x, ...) \
1840 what(x) _PICOTEST_FOR_EACH_35 _PICOTEST_PARENS(what, __VA_ARGS__)
1841#define _PICOTEST_FOR_EACH_37(what, x, ...) \
1842 what(x) _PICOTEST_FOR_EACH_36 _PICOTEST_PARENS(what, __VA_ARGS__)
1843#define _PICOTEST_FOR_EACH_38(what, x, ...) \
1844 what(x) _PICOTEST_FOR_EACH_37 _PICOTEST_PARENS(what, __VA_ARGS__)
1845#define _PICOTEST_FOR_EACH_39(what, x, ...) \
1846 what(x) _PICOTEST_FOR_EACH_38 _PICOTEST_PARENS(what, __VA_ARGS__)
1847#define _PICOTEST_FOR_EACH_40(what, x, ...) \
1848 what(x) _PICOTEST_FOR_EACH_39 _PICOTEST_PARENS(what, __VA_ARGS__)
1849#define _PICOTEST_FOR_EACH_41(what, x, ...) \
1850 what(x) _PICOTEST_FOR_EACH_40 _PICOTEST_PARENS(what, __VA_ARGS__)
1851#define _PICOTEST_FOR_EACH_42(what, x, ...) \
1852 what(x) _PICOTEST_FOR_EACH_41 _PICOTEST_PARENS(what, __VA_ARGS__)
1853#define _PICOTEST_FOR_EACH_43(what, x, ...) \
1854 what(x) _PICOTEST_FOR_EACH_42 _PICOTEST_PARENS(what, __VA_ARGS__)
1855#define _PICOTEST_FOR_EACH_44(what, x, ...) \
1856 what(x) _PICOTEST_FOR_EACH_43 _PICOTEST_PARENS(what, __VA_ARGS__)
1857#define _PICOTEST_FOR_EACH_45(what, x, ...) \
1858 what(x) _PICOTEST_FOR_EACH_44 _PICOTEST_PARENS(what, __VA_ARGS__)
1859#define _PICOTEST_FOR_EACH_46(what, x, ...) \
1860 what(x) _PICOTEST_FOR_EACH_45 _PICOTEST_PARENS(what, __VA_ARGS__)
1861#define _PICOTEST_FOR_EACH_47(what, x, ...) \
1862 what(x) _PICOTEST_FOR_EACH_46 _PICOTEST_PARENS(what, __VA_ARGS__)
1863#define _PICOTEST_FOR_EACH_48(what, x, ...) \
1864 what(x) _PICOTEST_FOR_EACH_47 _PICOTEST_PARENS(what, __VA_ARGS__)
1865#define _PICOTEST_FOR_EACH_49(what, x, ...) \
1866 what(x) _PICOTEST_FOR_EACH_48 _PICOTEST_PARENS(what, __VA_ARGS__)
1867#define _PICOTEST_FOR_EACH_50(what, x, ...) \
1868 what(x) _PICOTEST_FOR_EACH_49 _PICOTEST_PARENS(what, __VA_ARGS__)
1869#define _PICOTEST_FOR_EACH_51(what, x, ...) \
1870 what(x) _PICOTEST_FOR_EACH_50 _PICOTEST_PARENS(what, __VA_ARGS__)
1871#define _PICOTEST_FOR_EACH_52(what, x, ...) \
1872 what(x) _PICOTEST_FOR_EACH_51 _PICOTEST_PARENS(what, __VA_ARGS__)
1873#define _PICOTEST_FOR_EACH_53(what, x, ...) \
1874 what(x) _PICOTEST_FOR_EACH_52 _PICOTEST_PARENS(what, __VA_ARGS__)
1875#define _PICOTEST_FOR_EACH_54(what, x, ...) \
1876 what(x) _PICOTEST_FOR_EACH_53 _PICOTEST_PARENS(what, __VA_ARGS__)
1877#define _PICOTEST_FOR_EACH_55(what, x, ...) \
1878 what(x) _PICOTEST_FOR_EACH_54 _PICOTEST_PARENS(what, __VA_ARGS__)
1879#define _PICOTEST_FOR_EACH_56(what, x, ...) \
1880 what(x) _PICOTEST_FOR_EACH_55 _PICOTEST_PARENS(what, __VA_ARGS__)
1881#define _PICOTEST_FOR_EACH_57(what, x, ...) \
1882 what(x) _PICOTEST_FOR_EACH_56 _PICOTEST_PARENS(what, __VA_ARGS__)
1883#define _PICOTEST_FOR_EACH_58(what, x, ...) \
1884 what(x) _PICOTEST_FOR_EACH_57 _PICOTEST_PARENS(what, __VA_ARGS__)
1885#define _PICOTEST_FOR_EACH_59(what, x, ...) \
1886 what(x) _PICOTEST_FOR_EACH_58 _PICOTEST_PARENS(what, __VA_ARGS__)
1887#define _PICOTEST_FOR_EACH_60(what, x, ...) \
1888 what(x) _PICOTEST_FOR_EACH_59 _PICOTEST_PARENS(what, __VA_ARGS__)
1889#define _PICOTEST_FOR_EACH_61(what, x, ...) \
1890 what(x) _PICOTEST_FOR_EACH_60 _PICOTEST_PARENS(what, __VA_ARGS__)
1891#define _PICOTEST_FOR_EACH_62(what, x, ...) \
1892 what(x) _PICOTEST_FOR_EACH_61 _PICOTEST_PARENS(what, __VA_ARGS__)
1893#define _PICOTEST_FOR_EACH_63(what, x, ...) \
1894 what(x) _PICOTEST_FOR_EACH_62 _PICOTEST_PARENS(what, __VA_ARGS__)
1895#else
1896#define _PICOTEST_FOR_EACH_1(what, x) what(x)
1897#define _PICOTEST_FOR_EACH_2(what, x, ...) \
1898 what(x) _PICOTEST_FOR_EACH_1(what, __VA_ARGS__)
1899#define _PICOTEST_FOR_EACH_3(what, x, ...) \
1900 what(x) _PICOTEST_FOR_EACH_2(what, __VA_ARGS__)
1901#define _PICOTEST_FOR_EACH_4(what, x, ...) \
1902 what(x) _PICOTEST_FOR_EACH_3(what, __VA_ARGS__)
1903#define _PICOTEST_FOR_EACH_5(what, x, ...) \
1904 what(x) _PICOTEST_FOR_EACH_4(what, __VA_ARGS__)
1905#define _PICOTEST_FOR_EACH_6(what, x, ...) \
1906 what(x) _PICOTEST_FOR_EACH_5(what, __VA_ARGS__)
1907#define _PICOTEST_FOR_EACH_7(what, x, ...) \
1908 what(x) _PICOTEST_FOR_EACH_6(what, __VA_ARGS__)
1909#define _PICOTEST_FOR_EACH_8(what, x, ...) \
1910 what(x) _PICOTEST_FOR_EACH_7(what, __VA_ARGS__)
1911#define _PICOTEST_FOR_EACH_9(what, x, ...) \
1912 what(x) _PICOTEST_FOR_EACH_8(what, __VA_ARGS__)
1913#define _PICOTEST_FOR_EACH_10(what, x, ...) \
1914 what(x) _PICOTEST_FOR_EACH_9(what, __VA_ARGS__)
1915#define _PICOTEST_FOR_EACH_11(what, x, ...) \
1916 what(x) _PICOTEST_FOR_EACH_10(what, __VA_ARGS__)
1917#define _PICOTEST_FOR_EACH_12(what, x, ...) \
1918 what(x) _PICOTEST_FOR_EACH_11(what, __VA_ARGS__)
1919#define _PICOTEST_FOR_EACH_13(what, x, ...) \
1920 what(x) _PICOTEST_FOR_EACH_12(what, __VA_ARGS__)
1921#define _PICOTEST_FOR_EACH_14(what, x, ...) \
1922 what(x) _PICOTEST_FOR_EACH_13(what, __VA_ARGS__)
1923#define _PICOTEST_FOR_EACH_15(what, x, ...) \
1924 what(x) _PICOTEST_FOR_EACH_14(what, __VA_ARGS__)
1925#define _PICOTEST_FOR_EACH_16(what, x, ...) \
1926 what(x) _PICOTEST_FOR_EACH_15(what, __VA_ARGS__)
1927#define _PICOTEST_FOR_EACH_17(what, x, ...) \
1928 what(x) _PICOTEST_FOR_EACH_16(what, __VA_ARGS__)
1929#define _PICOTEST_FOR_EACH_18(what, x, ...) \
1930 what(x) _PICOTEST_FOR_EACH_17(what, __VA_ARGS__)
1931#define _PICOTEST_FOR_EACH_19(what, x, ...) \
1932 what(x) _PICOTEST_FOR_EACH_18(what, __VA_ARGS__)
1933#define _PICOTEST_FOR_EACH_20(what, x, ...) \
1934 what(x) _PICOTEST_FOR_EACH_19(what, __VA_ARGS__)
1935#define _PICOTEST_FOR_EACH_21(what, x, ...) \
1936 what(x) _PICOTEST_FOR_EACH_20(what, __VA_ARGS__)
1937#define _PICOTEST_FOR_EACH_22(what, x, ...) \
1938 what(x) _PICOTEST_FOR_EACH_21(what, __VA_ARGS__)
1939#define _PICOTEST_FOR_EACH_23(what, x, ...) \
1940 what(x) _PICOTEST_FOR_EACH_22(what, __VA_ARGS__)
1941#define _PICOTEST_FOR_EACH_24(what, x, ...) \
1942 what(x) _PICOTEST_FOR_EACH_23(what, __VA_ARGS__)
1943#define _PICOTEST_FOR_EACH_25(what, x, ...) \
1944 what(x) _PICOTEST_FOR_EACH_24(what, __VA_ARGS__)
1945#define _PICOTEST_FOR_EACH_26(what, x, ...) \
1946 what(x) _PICOTEST_FOR_EACH_25(what, __VA_ARGS__)
1947#define _PICOTEST_FOR_EACH_27(what, x, ...) \
1948 what(x) _PICOTEST_FOR_EACH_26(what, __VA_ARGS__)
1949#define _PICOTEST_FOR_EACH_28(what, x, ...) \
1950 what(x) _PICOTEST_FOR_EACH_27(what, __VA_ARGS__)
1951#define _PICOTEST_FOR_EACH_29(what, x, ...) \
1952 what(x) _PICOTEST_FOR_EACH_28(what, __VA_ARGS__)
1953#define _PICOTEST_FOR_EACH_30(what, x, ...) \
1954 what(x) _PICOTEST_FOR_EACH_29(what, __VA_ARGS__)
1955#define _PICOTEST_FOR_EACH_31(what, x, ...) \
1956 what(x) _PICOTEST_FOR_EACH_30(what, __VA_ARGS__)
1957#define _PICOTEST_FOR_EACH_32(what, x, ...) \
1958 what(x) _PICOTEST_FOR_EACH_31(what, __VA_ARGS__)
1959#define _PICOTEST_FOR_EACH_33(what, x, ...) \
1960 what(x) _PICOTEST_FOR_EACH_32(what, __VA_ARGS__)
1961#define _PICOTEST_FOR_EACH_34(what, x, ...) \
1962 what(x) _PICOTEST_FOR_EACH_33(what, __VA_ARGS__)
1963#define _PICOTEST_FOR_EACH_35(what, x, ...) \
1964 what(x) _PICOTEST_FOR_EACH_34(what, __VA_ARGS__)
1965#define _PICOTEST_FOR_EACH_36(what, x, ...) \
1966 what(x) _PICOTEST_FOR_EACH_35(what, __VA_ARGS__)
1967#define _PICOTEST_FOR_EACH_37(what, x, ...) \
1968 what(x) _PICOTEST_FOR_EACH_36(what, __VA_ARGS__)
1969#define _PICOTEST_FOR_EACH_38(what, x, ...) \
1970 what(x) _PICOTEST_FOR_EACH_37(what, __VA_ARGS__)
1971#define _PICOTEST_FOR_EACH_39(what, x, ...) \
1972 what(x) _PICOTEST_FOR_EACH_38(what, __VA_ARGS__)
1973#define _PICOTEST_FOR_EACH_40(what, x, ...) \
1974 what(x) _PICOTEST_FOR_EACH_39(what, __VA_ARGS__)
1975#define _PICOTEST_FOR_EACH_41(what, x, ...) \
1976 what(x) _PICOTEST_FOR_EACH_40(what, __VA_ARGS__)
1977#define _PICOTEST_FOR_EACH_42(what, x, ...) \
1978 what(x) _PICOTEST_FOR_EACH_41(what, __VA_ARGS__)
1979#define _PICOTEST_FOR_EACH_43(what, x, ...) \
1980 what(x) _PICOTEST_FOR_EACH_42(what, __VA_ARGS__)
1981#define _PICOTEST_FOR_EACH_44(what, x, ...) \
1982 what(x) _PICOTEST_FOR_EACH_43(what, __VA_ARGS__)
1983#define _PICOTEST_FOR_EACH_45(what, x, ...) \
1984 what(x) _PICOTEST_FOR_EACH_44(what, __VA_ARGS__)
1985#define _PICOTEST_FOR_EACH_46(what, x, ...) \
1986 what(x) _PICOTEST_FOR_EACH_45(what, __VA_ARGS__)
1987#define _PICOTEST_FOR_EACH_47(what, x, ...) \
1988 what(x) _PICOTEST_FOR_EACH_46(what, __VA_ARGS__)
1989#define _PICOTEST_FOR_EACH_48(what, x, ...) \
1990 what(x) _PICOTEST_FOR_EACH_47(what, __VA_ARGS__)
1991#define _PICOTEST_FOR_EACH_49(what, x, ...) \
1992 what(x) _PICOTEST_FOR_EACH_48(what, __VA_ARGS__)
1993#define _PICOTEST_FOR_EACH_50(what, x, ...) \
1994 what(x) _PICOTEST_FOR_EACH_49(what, __VA_ARGS__)
1995#define _PICOTEST_FOR_EACH_51(what, x, ...) \
1996 what(x) _PICOTEST_FOR_EACH_50(what, __VA_ARGS__)
1997#define _PICOTEST_FOR_EACH_52(what, x, ...) \
1998 what(x) _PICOTEST_FOR_EACH_51(what, __VA_ARGS__)
1999#define _PICOTEST_FOR_EACH_53(what, x, ...) \
2000 what(x) _PICOTEST_FOR_EACH_52(what, __VA_ARGS__)
2001#define _PICOTEST_FOR_EACH_54(what, x, ...) \
2002 what(x) _PICOTEST_FOR_EACH_53(what, __VA_ARGS__)
2003#define _PICOTEST_FOR_EACH_55(what, x, ...) \
2004 what(x) _PICOTEST_FOR_EACH_54(what, __VA_ARGS__)
2005#define _PICOTEST_FOR_EACH_56(what, x, ...) \
2006 what(x) _PICOTEST_FOR_EACH_55(what, __VA_ARGS__)
2007#define _PICOTEST_FOR_EACH_57(what, x, ...) \
2008 what(x) _PICOTEST_FOR_EACH_56(what, __VA_ARGS__)
2009#define _PICOTEST_FOR_EACH_58(what, x, ...) \
2010 what(x) _PICOTEST_FOR_EACH_57(what, __VA_ARGS__)
2011#define _PICOTEST_FOR_EACH_59(what, x, ...) \
2012 what(x) _PICOTEST_FOR_EACH_58(what, __VA_ARGS__)
2013#define _PICOTEST_FOR_EACH_60(what, x, ...) \
2014 what(x) _PICOTEST_FOR_EACH_59(what, __VA_ARGS__)
2015#define _PICOTEST_FOR_EACH_61(what, x, ...) \
2016 what(x) _PICOTEST_FOR_EACH_60(what, __VA_ARGS__)
2017#define _PICOTEST_FOR_EACH_62(what, x, ...) \
2018 what(x) _PICOTEST_FOR_EACH_61(what, __VA_ARGS__)
2019#define _PICOTEST_FOR_EACH_63(what, x, ...) \
2020 what(x) _PICOTEST_FOR_EACH_62(what, __VA_ARGS__)
2021#endif /* defined(_PICOTEST_PARENS) */
2023
2025
2028
2029#endif /* _PICOTEST */
void PicoTestAssertBeforeProc(const char *type, const char *test)
Function signature of assert before hooks.
Definition picotest.h:905
void PicoTestAssertAfterProc(const char *type, const char *test, int fail)
Function signature of assert after hooks.
Definition picotest.h:954
void PicoTestFixtureAfterSetupProc(const char *fixtureName, const char *testName)
Function signature of test fixture after setup hooks.
Definition picotest.h:1214
void PicoTestFixtureBeforeSetupProc(const char *fixtureName, const char *testName)
Function signature of test fixture before setup hooks.
Definition picotest.h:1165
void PicoTestFixtureBeforeTeardownProc(const char *fixtureName, const char *testName, int fail)
Function signature of test fixture before teardown hooks.
Definition picotest.h:1264
void PicoTestFixtureAfterTeardownProc(const char *fixtureName, const char *testName, int fail)
Function signature of test fixture after teardown hooks.
Definition picotest.h:1315
const char * file
Definition picotest.h:111
const char * name
Definition picotest.h:110
PicoTestProc *const test
Definition picotest.h:113
const struct PicoTestMetadata ** subtests
Definition picotest.h:115
int nbSubtests
Definition picotest.h:114
int line
Definition picotest.h:112
void PicoTestVisitProc(const PicoTestMetadata *metadata, PicoTestVisitStep step)
Function signature of test visit proc.
Definition picotest.h:366
void PicoTestTraverseProc(const char *name, int nb)
Function signature of test traversal proc.
Definition picotest.h:299
int PicoTestProc(const char *cond)
Signature of test functions.
Definition picotest.h:104
PicoTestFilterResult PicoTestFilterProc(PicoTestProc *test, const char *testName, const char *cond)
Signature of test filter functions.
Definition picotest.h:215
PicoTestVisitStep
Test visit step.
Definition picotest.h:347
PicoTestFilterResult
Result of test filter functions.
Definition picotest.h:175
void PicoTestFailureLoggerProc(const char *file, int line, const char *type, const char *test, const char *msg, va_list args)
Function signature of test failure log handlers.
Definition picotest.h:438
@ PICOTEST_VISIT_ENTER
Enter the test.
Definition picotest.h:349
@ PICOTEST_VISIT_LEAVE
Leave the test.
Definition picotest.h:352
@ PICOTEST_FILTER_SKIP
Test does not match the condition, skip this test and all its subtests.
Definition picotest.h:178
@ PICOTEST_FILTER_PASS
Test matches the condition, run this test and all its subtests.
Definition picotest.h:181
@ PICOTEST_FILTER_SKIP_PROPAGATE
Test does not match the condition, skip this test but filter its subtests.
Definition picotest.h:185
@ PICOTEST_FILTER_PASS_PROPAGATE
Test matches the condition, run this test but filter its subtests.
Definition picotest.h:188
Test metadata.
Definition picotest.h:109
void PicoTestCaseEnterProc(const char *testName)
Function signature of test case enter hooks.
Definition picotest.h:633
void PicoTestCaseLeaveProc(const char *testName, int fail)
Function signature of test case leave hooks.
Definition picotest.h:681
void PicoTestSuiteEnterProc(const char *suiteName, int nb)
Function signature of test suite enter hooks.
Definition picotest.h:1469
void PicoTestSuiteLeaveProc(const char *suiteName, int nb, int fail)
Function signature of test suite leave hooks.
Definition picotest.h:1517
void PicoTestSuiteBeforeSubtestProc(const char *suiteName, int nb, int fail, int index, const char *testName)
Function signature of test suite before subtest hooks.
Definition picotest.h:1571
void PicoTestSuiteAfterSubtestProc(const char *suiteName, int nb, int fail, int index, const char *testName, int sfail)
Function signature of test suite after subtest hooks.
Definition picotest.h:1628