|
|
28bab8 |
From e9a19a54e57766895767798da15da953078390a8 Mon Sep 17 00:00:00 2001
|
|
|
28bab8 |
From: Martin Kutlak <mkutlak@redhat.com>
|
|
|
28bab8 |
Date: Thu, 27 Sep 2018 13:49:54 +0200
|
|
|
28bab8 |
Subject: [PATCH] testsuite: Add macros for value comparison
|
|
|
28bab8 |
|
|
|
28bab8 |
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
|
|
28bab8 |
---
|
|
|
28bab8 |
tests/helpers/testsuite.h | 13 +++++++++++++
|
|
|
28bab8 |
1 file changed, 13 insertions(+)
|
|
|
28bab8 |
|
|
|
28bab8 |
diff --git a/tests/helpers/testsuite.h b/tests/helpers/testsuite.h
|
|
|
28bab8 |
index 28bfd3eb..bc7abf1d 100644
|
|
|
28bab8 |
--- a/tests/helpers/testsuite.h
|
|
|
28bab8 |
+++ b/tests/helpers/testsuite.h
|
|
|
28bab8 |
@@ -168,9 +168,22 @@ FILE *g_testsuite_output_stream = 0;
|
|
|
28bab8 |
#define TS_ASSERT_SIGNED_EQ(actual, expected) \
|
|
|
28bab8 |
TS_ASSERT_SIGNED_OP_MESSAGE(actual, ==, expected, NULL)
|
|
|
28bab8 |
|
|
|
28bab8 |
+
|
|
|
28bab8 |
+#define TS_ASSERT_SIGNED_NEQ(actual, expected) \
|
|
|
28bab8 |
+ TS_ASSERT_SIGNED_OP_MESSAGE(actual, !=, expected, NULL)
|
|
|
28bab8 |
+
|
|
|
28bab8 |
#define TS_ASSERT_SIGNED_GE(actual, expected) \
|
|
|
28bab8 |
TS_ASSERT_SIGNED_OP_MESSAGE(actual, >=, expected, NULL)
|
|
|
28bab8 |
|
|
|
28bab8 |
+#define TS_ASSERT_SIGNED_GT(actual, expected) \
|
|
|
28bab8 |
+ TS_ASSERT_SIGNED_OP_MESSAGE(actual, >, expected, NULL)
|
|
|
28bab8 |
+
|
|
|
28bab8 |
+#define TS_ASSERT_SIGNED_LE(actual, expected) \
|
|
|
28bab8 |
+ TS_ASSERT_SIGNED_OP_MESSAGE(actual, <=, expected, NULL)
|
|
|
28bab8 |
+
|
|
|
28bab8 |
+#define TS_ASSERT_SIGNED_LT(actual, expected) \
|
|
|
28bab8 |
+ TS_ASSERT_SIGNED_OP_MESSAGE(actual, <, expected, NULL)
|
|
|
28bab8 |
+
|
|
|
28bab8 |
|
|
|
28bab8 |
/*
|
|
|
28bab8 |
* Testing of chars
|
|
|
28bab8 |
--
|
|
|
28bab8 |
2.17.2
|
|
|
28bab8 |
|