From 50a527f757f69befbe4081dd90467bdaef50a68f Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 1 Aug 2024 15:43:30 +0530 Subject: tests: clean up --- include/test.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'include') 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 = ""; -#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 -- cgit v1.2.3