mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
lib/igt_core: Add igt_assert_eq
Suggested by Chris Wilson. Not yet rolled out since I'm trying to use cocci for this. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
b4c1f2ea0f
commit
3448b5ad4b
@ -252,6 +252,19 @@ void igt_exit(void) __attribute__((noreturn));
|
||||
"error: %d %s %d\n", __n1, #cmp, __n2); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* igt_assert_eq:
|
||||
* @n1: first integer
|
||||
* @n2: second integer
|
||||
*
|
||||
* Fails (sub-)test if the two integers are not equal. 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_eq(n1, n2) igt_assert_cmpint(n1, ==, n2)
|
||||
|
||||
/**
|
||||
* igt_require:
|
||||
* @expr: condition to test
|
||||
|
Loading…
x
Reference in New Issue
Block a user