[Telepathy-commits] [telepathy-glib/master] tests/lib/myassert.h: add convenience macros for string/uint equality assertions
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Oct 10 04:27:30 PDT 2008
---
tests/lib/myassert.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/tests/lib/myassert.h b/tests/lib/myassert.h
index 2b071ee..7d67faa 100644
--- a/tests/lib/myassert.h
+++ b/tests/lib/myassert.h
@@ -37,4 +37,11 @@ static void myassert_failed (void);
g_quark_to_string ((right)->domain), (right)->code, (right)->message);\
} G_STMT_END
+#define MYASSERT_SAME_STRING(left, right) \
+ MYASSERT (!tp_strdiff ((left), (right)), ": \"%s\" != \"%s\"", \
+ (left), (right))
+
+#define MYASSERT_SAME_UINT(left, right) \
+ MYASSERT ((left) == (right), ": %u != %u", (left), (right))
+
#endif
--
1.5.6.5
More information about the Telepathy-commits
mailing list