12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- if (!(test)) {\
- fprintf(\
- stderr, "!!! Assertion failed at %s:%d. Message: %s\n", \
- __FILE__, __LINE__, msg); \
- return -1; \
- }\
- } while (0)
- if ((exp) != (got)) {\
- fprintf(\
- stderr, "!!! Test failed at %s:%d. Expected: %lu; got: %lu\n",\
- __FILE__, __LINE__, (size_t)(exp), (size_t)(got)); \
- return -1; \
- }\
- } while (0)
- if (strcmp((exp), (got)) != 0) {\
- fprintf(\
- stderr, "!!! Test failed at %s:%d. Expected: %s; got: %s\n", \
- __FILE__, __LINE__, (exp), (got)); \
- return -1; \
- }\
- } while (0)
- int rc = (exp); \
- if (rc != LSUP_OK) {\
- fprintf(\
- stderr, "!!! Test failed at %s:%d. Error code: %d\n",\
- __FILE__, __LINE__, rc); \
- return -1; \
- }\
- } while (0)
- if (rc != 0) return -1; } while (0)
- int tests_run;
|