[Telepathy-commits] [telepathy-glib/master] tests/lib/util.h: add test_assert_no_error()

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Mar 11 10:15:46 PDT 2009


---
 tests/lib/util.c |   10 ++++++++++
 tests/lib/util.h |    2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/lib/util.c b/tests/lib/util.c
index 162293d..35d3790 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -15,3 +15,13 @@ test_connection_run_until_dbus_queue_processed (TpConnection *connection)
 {
   tp_cli_connection_run_get_protocol (connection, -1, NULL, NULL, NULL);
 }
+
+void
+test_assert_no_error (const GError *error)
+{
+  if (error != NULL)
+    {
+      g_error ("%s: code %u: %s", g_quark_to_string (error->domain),
+          error->code, error->message);
+    }
+}
diff --git a/tests/lib/util.h b/tests/lib/util.h
index a6be5d1..0d29f67 100644
--- a/tests/lib/util.h
+++ b/tests/lib/util.h
@@ -15,4 +15,6 @@
 
 void test_connection_run_until_dbus_queue_processed (TpConnection *connection);
 
+void test_assert_no_error (const GError *error);
+
 #endif
-- 
1.5.6.5




More information about the telepathy-commits mailing list