[librest/wip/teuf/gtask: 28/37] tests/custom-serialize: Port to GTest api



commit c5cecbf44e42e98f5c11770e552eafd2d224b141
Author: Timm Bäder <mail baedert org>
Date:   Sat Apr 23 16:47:16 2016 +0200

    tests/custom-serialize: Port to GTest api

 tests/custom-serialize.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c
index 1711d68..c3fde93 100644
--- a/tests/custom-serialize.c
+++ b/tests/custom-serialize.c
@@ -121,8 +121,8 @@ server_func (gpointer data)
   return NULL;
 }
 
-int
-main (int argc, char **argv)
+static void
+test_custom_serialize ()
 {
   RestProxy *proxy;
   RestProxyCall *call;
@@ -146,6 +146,13 @@ main (int argc, char **argv)
   g_object_unref (call);
   g_object_unref (proxy);
   g_free (url);
+}
+
+int
+main (int argc, char **argv)
+{
+  g_test_init (&argc, &argv, NULL);
+  g_test_add_func ("/custom-serialize/custom-serialize", test_custom_serialize);
 
-  return 0;
+  return g_test_run ();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]