diff --git a/lib/c_glib/test/Makefile.am b/lib/c_glib/test/Makefile.am
index a8889be..e9f070e 100644
--- a/lib/c_glib/test/Makefile.am
+++ b/lib/c_glib/test/Makefile.am
@@ -6,25 +6,9 @@
 CFLAGS = @GCOV_CFLAGS@
 CXXFLAGS = -g
 
-check_SCRIPTS = \
-  testwrapper-testtransportsocket \
-  testwrapper-testprotocolbinary \
-  testwrapper-testbufferedtransport \
-  testwrapper-testframedtransport \
-  testwrapper-testmemorybuffer \
-  testwrapper-teststruct \
-  testwrapper-testsimpleserver \
-  testwrapper-testdebugproto \
-  testwrapper-testoptionalrequired \
-  testwrapper-testthrifttest
-
-if WITH_CPP
-  check_SCRIPTS += testwrapper-testthrifttestclient
-endif
-
 check_PROGRAMS = \
   testtransportsocket \
-  testprotocolbinary \
+  testbinaryprotocol \
   testbufferedtransport \
   testframedtransport \
   testmemorybuffer \
@@ -44,8 +28,8 @@
     ../libthrift_c_glib_la-thrift_server_transport.o \
     ../libthrift_c_glib_la-thrift_server_socket.o
 
-testprotocolbinary_SOURCES = testprotocolbinary.c
-testprotocolbinary_LDADD = \
+testbinaryprotocol_SOURCES = testbinaryprotocol.c
+testbinaryprotocol_LDADD = \
     ../libthrift_c_glib_la-thrift_protocol.o \
     ../libthrift_c_glib_la-thrift_transport.o \
     ../libthrift_c_glib_la-thrift_socket.o \
@@ -158,9 +142,7 @@
 gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest.h: ../../../test/ThriftTest.thrift
 	$(THRIFT) --gen cpp $<
 
-
 TESTS = \
-  $(testwrapper-%) \
   $(check_PROGRAMS) \
   $(check_SCRIPTS)
 
@@ -212,18 +194,13 @@
 	    ${VALGRIND_LEAK_OPTS}                                       \
 	    ${$<_VALGRIND_LEAK_OPTS}  ./$<
 
-testwrapper-%: % test-wrapper.sh
-	@ln -sf test-wrapper.sh $@
-
 clean-local:
 	$(RM) -r gen-c_glib gen-cpp
 
 CLEANFILES =                            \
-    testwrapper-*                       \
     *.bb                                \
     *.bbg                               \
     *.da                                \
     *.gcno                              \
     *.gcda                              \
-    *.gcov                              \
-    test-wrapper.sh
+    *.gcov
diff --git a/lib/c_glib/test/test-wrapper.sh.in b/lib/c_glib/test/test-wrapper.sh.in
deleted file mode 100644
index 956b2d1..0000000
--- a/lib/c_glib/test/test-wrapper.sh.in
+++ /dev/null
@@ -1,58 +0,0 @@
-# /bin/sh
-
-command="$0"
-
-stripcommand=`echo "$command" | sed 's/testwrapper-//'`
-
-"$stripcommand" "$@" || exit $?
-
-if test "x@ENABLE_COVERAGE@" = "x1"; then
-  # linux: 97.67% of 86 lines executed in file ../src/test123.h
-  # bsd: 100.00% of 196 source lines executed in file testbimap.c
-
-  extrastripcommand=`echo "$stripcommand" | sed 's/\.\///'`
-    ${GCOV:-gcov} "$extrastripcommand" 2>&1                        \
-  | perl -ne 'BEGIN { $file = undef; }
-      next if m!^Creating!;
-      next if m!creating!;
-      next if m!^$!;
-      next if m!not exhausted!;
-      next if m!^Unexpected EOF!;
-      if (m!([\d\.]+)\% of \d+( source)? lines executed in file (.+)!)
-        {
-          do
-            {
-              if ( $3 !~ m#^/# )
-                {
-                  $a = $3 =~ m%([\-\w\.]+)$%;
-                  print STDERR $_;
-                  print "$1.gcov\n";
-                }
-            } if $1 < 110.0;
-        }
-      elsif (m#^File .(.*?).$#)
-        {
-          $file = $1;
-        }
-      elsif (m#Lines executed:([\d\.]+)\% of (\d+)#)
-        {
-          $percent = $1;
-          $lines = $2;
-          do
-            {
-              if ( $file !~ m#^/# )
-                {
-                  $a = $file =~ m%([\-\w\.]+)$%;
-                  print STDERR "$percent% of $lines executed in file $file\n";
-                  print "$1.gcov\n";
-                }
-            } if $percent < 110.0;
-        }
-      else
-        {
-          print
-        }'                 \
-  | xargs grep -n -A2 -B2 '#####.*\w'
-  exit 0
-fi
-
diff --git a/lib/c_glib/test/testprotocolbinary.c b/lib/c_glib/test/testbinaryprotocol.c
similarity index 94%
rename from lib/c_glib/test/testprotocolbinary.c
rename to lib/c_glib/test/testbinaryprotocol.c
index c8a54b9..94813e2 100644
--- a/lib/c_glib/test/testprotocolbinary.c
+++ b/lib/c_glib/test/testbinaryprotocol.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -639,14 +658,15 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
-  g_type_init ();
-  test_create_and_destroy ();
-  test_initialize ();
-  test_read_and_write_primitives ();
-  test_read_and_write_complex_types ();
+  g_type_init();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/testmemorybuffer/CreateAndDestroy", test_create_and_destroy);
+  g_test_add_func ("/testmemorybuffer/Initialize", test_initialize);
+  g_test_add_func ("/testmemorybuffer/ReadAndWritePrimitives", test_read_and_write_primitives);
+  g_test_add_func ("/testmemorybuffer/ReadAndWriteComplexTypes", test_read_and_write_complex_types);
+
+  return g_test_run ();
 }
-
diff --git a/lib/c_glib/test/testbufferedtransport.c b/lib/c_glib/test/testbufferedtransport.c
index 6759509..fb49c8f 100644
--- a/lib/c_glib/test/testbufferedtransport.c
+++ b/lib/c_glib/test/testbufferedtransport.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <netdb.h>
 
@@ -176,13 +195,15 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
   g_type_init();
-  test_create_and_destroy();
-  test_open_and_close();
-  test_read_and_write();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/testbufferedtransport/CreateAndDestroy", test_create_and_destroy);
+  g_test_add_func ("/testbufferedtransport/OpenAndClose", test_open_and_close);
+  g_test_add_func ("/testbufferedtransport/ReadAndWrite", test_read_and_write);
+
+  return g_test_run ();
 }
 
diff --git a/lib/c_glib/test/testdebugproto.c b/lib/c_glib/test/testdebugproto.c
index b111e12..f0654f1 100644
--- a/lib/c_glib/test/testdebugproto.c
+++ b/lib/c_glib/test/testdebugproto.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <math.h>
 #include <glib-object.h>
 
@@ -7,12 +26,9 @@
 
 #include "gen-c_glib/t_test_debug_proto_test_types.h"
 
-
-int
-main(void)
+static void
+test_debug_proto(void)
 {
-  g_type_init ();
-
   TTestOneOfEach *ooe = NULL;
   TTestNesting *n = NULL;
   TTestHolyMoley *hm = NULL;
@@ -62,3 +78,15 @@
   return 0;
 }
 
+int
+main(int argc, char *argv[])
+{
+  g_type_init();
+  g_test_init (&argc, &argv, NULL);
+
+  g_test_add_func ("/testdebugproto/DebugProto", test_debug_proto);
+
+  return g_test_run ();
+}
+
+
diff --git a/lib/c_glib/test/testframedtransport.c b/lib/c_glib/test/testframedtransport.c
index 23951f7..3269bf5 100644
--- a/lib/c_glib/test/testframedtransport.c
+++ b/lib/c_glib/test/testframedtransport.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <netdb.h>
 
@@ -164,13 +183,14 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
   g_type_init();
-  test_create_and_destroy();
-  test_open_and_close();
-  test_read_and_write();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/testframedtransport/CreateAndDestroy", test_create_and_destroy);
+  g_test_add_func ("/testframedtransport/OpenAndClose", test_open_and_close);
+  g_test_add_func ("/testframedtransport/ReadAndWrite", test_read_and_write);
+
+  return g_test_run ();
 }
-
diff --git a/lib/c_glib/test/testmemorybuffer.c b/lib/c_glib/test/testmemorybuffer.c
index 52b18bf..65901bf 100644
--- a/lib/c_glib/test/testmemorybuffer.c
+++ b/lib/c_glib/test/testmemorybuffer.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <netdb.h>
 
@@ -63,13 +82,14 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
   g_type_init();
-  test_create_and_destroy();
-  test_open_and_close();
-  test_read_and_write();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/testmemorybuffer/CreateAndDestroy", test_create_and_destroy);
+  g_test_add_func ("/testmemorybuffer/OpenAndClose", test_open_and_close);
+  g_test_add_func ("/testmemorybuffer/ReadAndWrite", test_read_and_write);
+
+  return g_test_run ();
 }
-
diff --git a/lib/c_glib/test/testoptionalrequired.c b/lib/c_glib/test/testoptionalrequired.c
index cf44413..7165d93 100644
--- a/lib/c_glib/test/testoptionalrequired.c
+++ b/lib/c_glib/test/testoptionalrequired.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <glib.h>
 
@@ -167,16 +186,17 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
-  g_type_init ();
-  test_old_school1 ();
-  test_simple ();
-  test_tricky1 ();
-  test_tricky2 ();
-  test_tricky3 ();
-  test_tricky4 ();
-  return 0;
+  g_type_init();
+  g_test_init (&argc, &argv, NULL);
+
+  g_test_add_func ("/testoptionalrequired/OldSchool", test_old_school1);
+  g_test_add_func ("/testoptionalrequired/Simple", test_simple);
+  g_test_add_func ("/testoptionalrequired/Tricky1", test_tricky1);
+  g_test_add_func ("/testoptionalrequired/Tricky2", test_tricky2);
+  g_test_add_func ("/testoptionalrequired/Tricky3", test_tricky3);
+  g_test_add_func ("/testoptionalrequired/Tricky4", test_tricky4);
+
+  return g_test_run ();
 }
-
-
diff --git a/lib/c_glib/test/testsimpleserver.c b/lib/c_glib/test/testsimpleserver.c
index 182e9ef..282a6e8 100644
--- a/lib/c_glib/test/testsimpleserver.c
+++ b/lib/c_glib/test/testsimpleserver.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <glib.h>
 #include <stdlib.h>
@@ -5,6 +24,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 
+#include "thrift.h"
 #include "processor/thrift_processor.h"
 #include "transport/thrift_server_socket.h"
 
@@ -27,6 +47,8 @@
 };
 typedef struct _TestProcessorClass TestProcessorClass;
 
+G_DEFINE_TYPE(TestProcessor, test_processor, THRIFT_TYPE_PROCESSOR)
+
 gboolean
 test_processor_process (ThriftProcessor *processor, ThriftProtocol *in,
                         ThriftProtocol *out)
@@ -35,38 +57,15 @@
 }
 
 static void
-test_processor_class_init (ThriftProcessorClass *proc)
+test_processor_init (TestProcessor *p)
 {
-  proc->process = test_processor_process;
+  THRIFT_UNUSED_VAR (p);
 }
 
-GType
-test_processor_get_type (void)
+static void
+test_processor_class_init (TestProcessorClass *proc)
 {
-  static GType type = 0;
-
-  if (type == 0)
-  {
-    static const GTypeInfo info =
-    {
-      sizeof (TestProcessorClass),
-      NULL, /* base_init */
-      NULL, /* base_finalize */
-      (GClassInitFunc) test_processor_class_init,
-      NULL, /* class_finalize */
-      NULL, /* class_data */
-      sizeof (TestProcessor),
-      0, /* n_preallocs */
-      NULL, /* instance_init */
-      NULL, /* value_table */
-    };
-
-    type = g_type_register_static (THRIFT_TYPE_PROCESSOR,
-                                   "TestProcessorType",
-                                   &info, 0);
-  }
-
-  return type;
+  (THRIFT_PROCESSOR_CLASS(proc))->process = test_processor_process;
 }
 
 static void
@@ -104,10 +103,12 @@
 }
 
 int
-main (void)
+main(int argc, char *argv[])
 {
-  g_type_init ();
-  test_server ();
+  g_type_init();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/testsimpleserver/SimpleServer", test_server);
+
+  return g_test_run ();
 }
diff --git a/lib/c_glib/test/teststruct.c b/lib/c_glib/test/teststruct.c
index cb401e2..ec543be 100644
--- a/lib/c_glib/test/teststruct.c
+++ b/lib/c_glib/test/teststruct.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <glib-object.h>
 
@@ -20,67 +39,13 @@
 GType thrift_test_struct_get_type (void);
 
 #define THRIFT_TYPE_TEST_STRUCT (thrift_test_struct_get_type ())
-#define THRIFT_TEST_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-                                     THRIFT_TYPE_TEST_STRUCT, \
-                                     ThriftTestStruct))
-#define THRIFT_TEST_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), \
-                                         THRIFT_TYPE_TEST_STRUCT, \
-                                         ThriftTestStructClass))
-#define THRIFT_IS_TEST_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-                                        THRIFT_TYPE_TEST_STRUCT))
-#define THRIFT_IS_TEST_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), \
-                                            THRIFT_TYPE_TEST_STRUCT))
-#define THRIFT_TEST_STRUCT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-                                               THRIFT_TYPE_TEST_STRUCT, \
-                                               ThriftTestStructClass))
+#define THRIFT_TEST_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THRIFT_TYPE_TEST_STRUCT, ThriftTestStruct))
+#define THRIFT_TEST_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), THRIFT_TYPE_TEST_STRUCT, ThriftTestStructClass))
+#define THRIFT_IS_TEST_STRUCT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), THRIFT_TYPE_TEST_STRUCT))
+#define THRIFT_IS_TEST_STRUCT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), THRIFT_TYPE_TEST_STRUCT))
+#define THRIFT_TEST_STRUCT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), THRIFT_TYPE_TEST_STRUCT, ThriftTestStructClass))
 
-/* test declarations */
-gint32 thrift_test_struct_read (ThriftStruct *object, ThriftProtocol *protocol,
-                                GError **error);
-gint32 thrift_test_struct_write (ThriftStruct *object, ThriftProtocol *protocol,
-                                 GError **error);
-
-static void
-thrift_test_struct_class_init (ThriftTestStructClass *cls)
-{
-  ThriftStructClass *ts_cls = THRIFT_STRUCT_CLASS (cls);
-  ts_cls->read = thrift_test_struct_read;
-  ts_cls->write = thrift_test_struct_write;
-}
-
-static void
-thrift_test_struct_instance_init (ThriftTestStruct *s)
-{
-  (void) s;
-}
-
-GType
-thrift_test_struct_get_type (void)
-{
-  static GType type = 0;
-
-  if (type == 0)
-  {
-    static const GTypeInfo type_info =
-    {
-      sizeof (ThriftTestStructClass),
-      NULL,
-      NULL,
-      (GClassInitFunc) thrift_test_struct_class_init,
-      NULL,
-      NULL,
-      sizeof (ThriftTestStruct),
-      0,
-      (GInstanceInitFunc) thrift_test_struct_instance_init,
-      NULL, 
-    };
-
-    type = g_type_register_static (THRIFT_TYPE_STRUCT,
-                                   "ThriftTestStructType", &type_info, 0);
-  }
-
-  return type;
-}
+G_DEFINE_TYPE(ThriftTestStruct, thrift_test_struct, THRIFT_TYPE_STRUCT)
 
 gint32
 thrift_test_struct_read (ThriftStruct *object, ThriftProtocol *protocol,
@@ -96,6 +61,19 @@
   return 0;
 }
 
+static void
+thrift_test_struct_class_init (ThriftTestStructClass *cls)
+{
+  ThriftStructClass *ts_cls = THRIFT_STRUCT_CLASS (cls);
+  ts_cls->read = thrift_test_struct_read;
+  ts_cls->write = thrift_test_struct_write;
+}
+
+static void
+thrift_test_struct_init (ThriftTestStruct *s)
+{
+  THRIFT_UNUSED_VAR (s);
+}
 
 static void
 test_initialize_object (void)
@@ -112,10 +90,12 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
-  g_type_init ();
-  test_initialize_object ();
+  g_type_init();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/teststruct/InitializeObject", test_initialize_object);
+
+  return g_test_run ();
 }
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 ();
+}
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index 4b5b841..15389a5 100644
--- a/lib/c_glib/test/testthrifttestclient.cpp
+++ b/lib/c_glib/test/testthrifttestclient.cpp
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 
 /* test a C client with a C++ server */
 
diff --git a/lib/c_glib/test/testtransportsocket.c b/lib/c_glib/test/testtransportsocket.c
index 14579c8..279da86 100644
--- a/lib/c_glib/test/testtransportsocket.c
+++ b/lib/c_glib/test/testtransportsocket.c
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 #include <assert.h>
 #include <netdb.h>
 
@@ -188,13 +207,15 @@
 }
 
 int
-main(void)
+main(int argc, char *argv[])
 {
   g_type_init();
-  test_create_and_destroy();
-  test_open_and_close();
-  test_read_and_write();
+  g_test_init (&argc, &argv, NULL);
 
-  return 0;
+  g_test_add_func ("/testtransportsocket/CreateAndDestroy", test_create_and_destroy);
+  g_test_add_func ("/testtransportsocket/OpenAndClose", test_open_and_close);
+  g_test_add_func ("/testtransportsocket/ReadAndWrite", test_read_and_write);
+
+  return g_test_run ();
 }
 
