diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-12 21:33:34 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-13 17:56:08 +0200 |
commit | 86b217128829b589f1d0f2dfa61743173dde4db3 (patch) | |
tree | e282c3edb7b029f0e2387956f65f2d716ae5957e /libkmstest | |
parent | e1b78c7b484a5025d854d8f1e5d0cc3f2cc3113e (diff) |
libkmstest: add FAIL()
Diffstat (limited to 'libkmstest')
-rw-r--r-- | libkmstest/test.h | 6 |
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__); \ |