Imported Upstream version 7.50.2
[platform/upstream/curl.git] / tests / unit / curlcheck.h
index 22f05c1..0660e2b 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -24,7 +24,7 @@
 /* The fail macros mark the current test step as failed, and continue */
 #define fail_if(expr, msg)                              \
   if(expr) {                                            \
-    fprintf(stderr, "%s:%d Assertion '%s' met: %s\n" ,  \
+    fprintf(stderr, "%s:%d Assertion '%s' met: %s\n"  \
             __FILE__, __LINE__, #expr, msg);            \
     unitfail++;                                         \
   }
 
 #define verify_memory(dynamic, check, len)                                  \
   if(dynamic && memcmp(dynamic, check, len)) {                              \
-    fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n", \
-            __FILE__, __LINE__, len, hexdump((unsigned char *)check, len));      \
+    fprintf(stderr, "%s:%d Memory buffer mismatch size %d. '%s' is not\n",  \
+            __FILE__, __LINE__, len, hexdump((unsigned char *)check, len)); \
     fprintf(stderr, "%s:%d the same as '%s'\n",                             \
-            __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len));         \
+            __FILE__, __LINE__, hexdump((unsigned char *)dynamic, len));    \
     unitfail++;                                                             \
   }
 
@@ -57,7 +57,7 @@
 /* The abort macros mark the current test step as failed, and exit the test */
 #define abort_if(expr, msg)                                   \
   if(expr) {                                                  \
-    fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n" ,  \
+    fprintf(stderr, "%s:%d Abort assertion '%s' met: %s\n"  \
             __FILE__, __LINE__, #expr, msg);                  \
     unitfail++;                                               \
     goto unit_test_abort;                                     \
@@ -85,10 +85,11 @@ extern int unitfail;
 #define UNITTEST_START                          \
   int test(char *arg)                           \
   {                                             \
-  (void)arg;                                    \
-  if (unit_setup()) {                           \
-    fail("unit_setup() failure");               \
-  } else {
+    (void)arg;                                  \
+    if(unit_setup()) {                          \
+      fail("unit_setup() failure");             \
+    }                                           \
+    else {
 
 #define UNITTEST_STOP                           \
     goto unit_test_abort; /* avoid warning */   \