summaryrefslogtreecommitdiff
path: root/libkmstest
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-12 21:33:34 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-13 17:56:08 +0200
commit86b217128829b589f1d0f2dfa61743173dde4db3 (patch)
treee282c3edb7b029f0e2387956f65f2d716ae5957e /libkmstest
parente1b78c7b484a5025d854d8f1e5d0cc3f2cc3113e (diff)
libkmstest: add FAIL()
Diffstat (limited to 'libkmstest')
-rw-r--r--libkmstest/test.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libkmstest/test.h b/libkmstest/test.h
index fb51d29..2700024 100644
--- a/libkmstest/test.h
+++ b/libkmstest/test.h
@@ -13,6 +13,12 @@
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__); \