]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/commitdiff
libkmstest: add FAIL()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 12 Nov 2015 19:33:34 +0000 (21:33 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 13 Nov 2015 15:56:08 +0000 (17:56 +0200)
libkmstest/test.h

index fb51d2929c143bbc137f4e28cedda51078292479..2700024c15ec1c29c030cfa72a08a1ece1f7c72d 100644 (file)
                abort(); \
        }
 
+#define FAIL(fmt, ...) \
+       do { \
+               fprintf(stderr, "%s:%d: %s:\n" fmt "\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__); \
+               abort(); \
+       } while(0)
+
 #define FAIL_IF(x, fmt, ...) \
        if (unlikely(x)) { \
                fprintf(stderr, "%s:%d: %s:\n" fmt "\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__); \