From 305fb1db5c1ec231b1cef3fd4c2106bc36ef48d8 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 27 Feb 2015 16:24:25 +0100 Subject: lib: add igt_assert_lt Found one user in gem_wait.c Signed-off-by: Daniel Vetter --- lib/igt_core.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/igt_core.h') diff --git a/lib/igt_core.h b/lib/igt_core.h index cc73a712..c2c820d1 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -381,6 +381,19 @@ void igt_exit(void) __attribute__((noreturn)); */ #define igt_assert_lte(n1, n2) igt_assert_cmpint(n1, <=, >, n2) +/** + * igt_assert_lt: + * @n1: first integer + * @n2: second integer + * + * Fails (sub-)test if the second integers is strictly smaller than the first. + * Beware that for now this only works on integers. + * + * Like igt_assert(), but displays the values being compared on failure instead + * of simply printing the stringified expression. + */ +#define igt_assert_lt(n1, n2) igt_assert_cmpint(n1, <, >=, n2) + /** * igt_require: * @expr: condition to test -- cgit v1.2.3