summaryrefslogtreecommitdiff
path: root/src/common/test.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/test.h')
-rw-r--r--src/common/test.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/test.h b/src/common/test.h
index 684968eaac..84ea1f9127 100644
--- a/src/common/test.h
+++ b/src/common/test.h
@@ -36,7 +36,7 @@ extern int have_failed;
#define test_assert(expr) \
STMT_BEGIN \
- if(expr) { printf("."); fflush(stdout); } else { \
+ if (expr) { printf("."); fflush(stdout); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): assertion failed: (%s)\n", \
__FILE__, \
@@ -49,7 +49,7 @@ extern int have_failed;
#define test_eq(expr1, expr2) \
STMT_BEGIN \
long v1=(long)(expr1), v2=(long)(expr2); \
- if(v1==v2) { printf("."); fflush(stdout); } else { \
+ if (v1==v2) { printf("."); fflush(stdout); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s==%s)\n"\
" (%ld != %ld)\n", \
@@ -64,7 +64,7 @@ extern int have_failed;
#define test_neq(expr1, expr2) \
STMT_BEGIN \
long v1=(long)(expr1), v2=(long)(expr2); \
- if(v1!=v2) { printf("."); fflush(stdout); } else { \
+ if (v1!=v2) { printf("."); fflush(stdout); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s!=%s)\n"\
" (%ld == %ld)\n", \
@@ -79,7 +79,7 @@ extern int have_failed;
#define test_streq(expr1, expr2) \
STMT_BEGIN \
const char *v1=(expr1), *v2=(expr2); \
- if(!strcmp(v1,v2)) { printf("."); fflush(stdout); } else { \
+ if (!strcmp(v1,v2)) { printf("."); fflush(stdout); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s==%s)\n"\
" (\"%s\" != \"%s\")\n", \
@@ -94,7 +94,7 @@ extern int have_failed;
#define test_strneq(expr1, expr2) \
STMT_BEGIN \
const char *v1=(expr1), *v2=(expr2); \
- if(strcmp(v1,v2)) { printf("."); fflush(stdout); } else { \
+ if (strcmp(v1,v2)) { printf("."); fflush(stdout); } else { \
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s!=%s)\n"\
" (\"%s\" == \"%s\")\n", \
@@ -109,7 +109,7 @@ extern int have_failed;
#define test_memeq(expr1, expr2, len) \
STMT_BEGIN \
const void *v1=(expr1), *v2=(expr2); \
- if(!memcmp(v1,v2,(len))) { printf("."); fflush(stdout); } else { \
+ if (!memcmp(v1,v2,(len))) { printf("."); fflush(stdout); } else {\
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s==%s)\n", \
__FILE__, \
@@ -122,7 +122,7 @@ extern int have_failed;
#define test_memneq(expr1, expr2, len) \
STMT_BEGIN \
void *v1=(expr1), *v2=(expr2); \
- if(memcmp(v1,v2,(len))) { printf("."); fflush(stdout); } else { \
+ if (memcmp(v1,v2,(len))) { printf("."); fflush(stdout); } else {\
have_failed = 1; \
printf("\nFile %s: line %d (%s): Assertion failed: (%s!=%s)\n", \
__FILE__, \