[next] telepathy-glib: fixup previous: util-cxx.cpp: convert to GTest

Simon McVittie smcv at kemper.freedesktop.org
Tue Mar 25 03:45:56 PDT 2014


Module: telepathy-glib
Branch: next
Commit: db6fa1b7cebd6bc3e782bef5d140b9d7c0291a35
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=db6fa1b7cebd6bc3e782bef5d140b9d7c0291a35

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Mar 20 12:33:22 2014 +0000

fixup previous: util-cxx.cpp: convert to GTest

I missed this one because it doesn't match *.c.

---

 tests/util-cxx.cpp |   32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/tests/util-cxx.cpp b/tests/util-cxx.cpp
index b8b822e..42213c0 100644
--- a/tests/util-cxx.cpp
+++ b/tests/util-cxx.cpp
@@ -23,7 +23,19 @@
 #include <gio/gio.h>
 #include <telepathy-glib/util.h>
 
-int main (int argc, char **argv)
+typedef struct {
+    int dummy;
+} Fixture;
+
+extern "C" void
+setup (Fixture *f,
+    gconstpointer data)
+{
+}
+
+extern "C" void
+test (Fixture *f,
+    gconstpointer data)
 {
   GObject *o;
   GHashTable *h;
@@ -36,6 +48,22 @@ int main (int argc, char **argv)
 
   h = g_hash_table_new (NULL, NULL);
   tp_clear_boxed (G_TYPE_HASH_TABLE, &h);
+}
+
+extern "C" void
+teardown (Fixture *f,
+    gconstpointer data)
+{
+}
+
+int
+main (int argc,
+    char **argv)
+{
+  g_test_init (&argc, &argv, NULL);
+  g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
+
+  g_test_add ("/util/cxx", Fixture, NULL, setup, test, teardown);
 
-  return 0;
+  return g_test_run ();
 }



More information about the telepathy-commits mailing list