diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-25 14:28:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-25 14:39:18 +0100 |
commit | e0dffbdeda010a0114e16fb7b2e3adb7336acff4 (patch) | |
tree | 0489ae4b3e3910a8a04be107f3dac64f97e7c526 /lib/igt_core.h | |
parent | 72b12636492cdf1c97eb1fec313165720f741cca (diff) |
core: Improve phrasing for test requirements
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r-- | lib/igt_core.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h index 2838cb18..1d3d7fc6 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -307,7 +307,10 @@ void igt_exit(void) __attribute__((noreturn)); * skipping. This is useful to streamline the skip logic since it allows for a more flat * code control flow, similar to igt_assert() */ -#define igt_require(expr) igt_skip_on(!(expr)) +#define igt_require(expr) \ + do { if (!(expr)) \ + __igt_skip_check(__FILE__, __LINE__, __func__, #expr , NULL); \ + } while (0) /** * igt_skip_on: @@ -321,7 +324,7 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_skip_on(expr) \ do { if ((expr)) \ - __igt_skip_check(__FILE__, __LINE__, __func__, #expr , NULL); \ + __igt_skip_check(__FILE__, __LINE__, __func__, "!(" #expr ")" , NULL); \ } while (0) /** |