[PATCH igt 1/8] lib/igt_core: Add igt_assert_neq_*() variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similar to igt_assert_eq_*(), add variants for non-equality of types
other than int.

Signed-off-by: Daniel Stone <daniels@xxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux