[Intel-gfx] [PATCH igt 1/8] lib/igt_core: Add igt_assert_neq_*() variants
Daniel Stone
daniels at collabora.com
Thu Oct 1 09:34:01 PDT 2015
Similar to igt_assert_eq_*(), add variants for non-equality of types
other than int.
Signed-off-by: Daniel Stone <daniels at collabora.com>
---
lib/igt_core.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/lib/igt_core.h b/lib/igt_core.h
index f8bfbf0..9a5d9c5 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -454,6 +454,33 @@ void igt_exit(void) __attribute__((noreturn));
#define igt_assert_neq(n1, n2) igt_assert_cmpint(n1, !=, ==, n2)
/**
+ * igt_assert_neq_u32:
+ * @n1: first integer
+ * @n2: second integer
+ *
+ * Like igt_assert_neq(), but for uint32_t.
+ */
+#define igt_assert_neq_u32(n1, n2) igt_assert_cmpuint(n1, !=, ==, n2)
+
+/**
+ * igt_assert_neq_u64:
+ * @n1: first integer
+ * @n2: second integer
+ *
+ * Like igt_assert_neq_u32(), but for uint64_t.
+ */
+#define igt_assert_neq_u64(n1, n2) igt_assert_cmpu64(n1, !=, ==, n2)
+
+/**
+ * igt_assert_neq_double:
+ * @n1: first double
+ * @n2: second double
+ *
+ * Like igt_assert_neq(), but for doubles.
+ */
+#define igt_assert_neq_double(n1, n2) igt_assert_cmpdouble(n1, !=, ==, n2)
+
+/**
* igt_assert_lte:
* @n1: first integer
* @n2: second integer
--
2.5.0
More information about the Intel-gfx
mailing list