diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-09-26 00:39:51 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-09-26 00:39:51 +0200 |
commit | a3ed1af8715c8a71dd5e7e3de136f3fade5a192c (patch) | |
tree | 12f000223cd77fcb3039a045ee68db0c88757f4a /examples/c-json-stdout/jsmn/test/test.h | |
parent | 5b9965ce63e1874ed18cc6615f1c449d875d12a3 (diff) |
Removed examples/c-json-stdout/jsmn as it's new location will be contrib/jsmn, soon.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-json-stdout/jsmn/test/test.h')
-rw-r--r-- | examples/c-json-stdout/jsmn/test/test.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/examples/c-json-stdout/jsmn/test/test.h b/examples/c-json-stdout/jsmn/test/test.h deleted file mode 100644 index a1c0957a7..000000000 --- a/examples/c-json-stdout/jsmn/test/test.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __TEST_H__ -#define __TEST_H__ - -static int test_passed = 0; -static int test_failed = 0; - -/* Terminate current test with error */ -#define fail() return __LINE__ - -/* Successful end of the test case */ -#define done() return 0 - -/* Check single condition */ -#define check(cond) \ - do { \ - if (!(cond)) \ - fail(); \ - } while (0) - -/* Test runner */ -static void test(int (*func)(void), const char *name) { - int r = func(); - if (r == 0) { - test_passed++; - } else { - test_failed++; - printf("FAILED: %s (at line %d)\n", name, r); - } -} - -#endif /* __TEST_H__ */ |