summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tests.h b/tests/tests.h
index 46b260d2..aaa3b101 100644
--- a/tests/tests.h
+++ b/tests/tests.h
@@ -60,4 +60,16 @@
fail_unless(__tmp1 != __tmp2, "%s:%i: " #what " is equal to " #to "(%p)", __func__, __LINE__, (void*)__tmp2); \
}
+#define check_str_equals(what, to) \
+{ typeof(what) __tmp; \
+ __tmp = (what); \
+ fail_unless(g_strcmp0(__tmp, to) == 0, "%s:%i: " #what " (%s) is not equal to %s", __func__, __LINE__, __tmp, to); \
+}
+
+#define check_str_not_equals(what, to) \
+{ typeof(what) __tmp; \
+ __tmp = (what); \
+ fail_unless(g_strcmp0(__tmp, to) != 0, "%s:%i: " #what " is equal to %s", __func__, __LINE__, to); \
+}
+
#endif /*__TESTS_H__ */