aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-08-01 15:43:30 +0530
committersinanmohd <sinan@sinanmohd.com>2024-08-01 15:56:56 +0530
commit50a527f757f69befbe4081dd90467bdaef50a68f (patch)
tree85148a6d50126d7ffea9122c568bdd2bac02a5ba /include
parentfb801a2b7d0ae0ed0fc6b3543974bb8e9fc64357 (diff)
tests: clean up
Diffstat (limited to 'include')
-rw-r--r--include/test.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/test.h b/include/test.h
index 64716cc..45b786c 100644
--- a/include/test.h
+++ b/include/test.h
@@ -3,21 +3,21 @@
char *__curtestname = "<none>";
-#define test_run(func) \
- do { \
- char *orig = __curtestname; \
- __curtestname = #func; \
- func(); \
- __curtestname = orig; \
+#define test_run(func) \
+ do { \
+ char *orig = __curtestname; \
+ __curtestname = #func; \
+ func(); \
+ __curtestname = orig; \
} while (0)
-#define test_assert(cond) \
- do { \
- if (!(cond)) { \
- fprintf(stderr, "%s:%d: %s: test_assert failed: %s\n", __FILE__, __LINE__, \
- __curtestname, #cond); \
- abort(); \
- } \
+#define test_assert(cond) \
+ do { \
+ if (!(cond)) { \
+ fprintf(stderr, "%s:%d: %s: test_assert failed: %s\n", \
+ __FILE__, __LINE__, __curtestname, #cond); \
+ abort(); \
+ } \
} while (0)
#endif