THRIFT-1003 Polishing c_glib code

Patch: Anatol Pomozov


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1039299 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/c_glib/test/testthrifttest.c b/lib/c_glib/test/testthrifttest.c
index 6020f9c..b14b606 100644
--- a/lib/c_glib/test/testthrifttest.c
+++ b/lib/c_glib/test/testthrifttest.c
@@ -7,22 +7,22 @@
 static const char TEST_ADDRESS[] = "localhost";
 static const int TEST_PORT = 64444;
 
-static void thrift_server (const int port);
-
 static void
-thrift_server (const int port)
+test_thrift_server (const int port)
 {
   ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
-                                              "port", port, NULL);
+                                              "port", TEST_PORT, NULL);
 
   g_object_unref (tsocket);
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
-  g_type_init ();
-  thrift_server (TEST_PORT);
-  return 0;
-}
+  g_type_init();
+  g_test_init (&argc, &argv, NULL);
 
+  g_test_add_func ("/testthrift/Server", test_thrift_server);
+
+  return g_test_run ();
+}