Commit 7c5d888e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

curlcheck.h: add fail()

fail is a new function/macro that a test case can use to indicate a test
failure for cases when the standard macros are not sufficient.
parent adb49ad8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -30,6 +30,16 @@
    unitfail++;                                                         \
  }

/* fail() is for when the test case figured out by itself that a check
   proved a failure */
#define fail(msg) do {                                                 \
    fprintf(stderr, "%s:%d test failed: '%s'\n",                       \
            __FILE__, __LINE__, msg);                                  \
    unitfail++;                                                        \
  } while(0)



extern int unitfail;

#define UNITTEST_START                          \