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/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 ();
}
-
-