Fix more void prototypes in tests
[platform/upstream/glib.git] / tests / gobject / gvalue-test.c
index 516a484..fa7bede 100644 (file)
@@ -37,8 +37,8 @@ static void
 test_enum_transformation (void)
 { 
   GType type; 
-  GValue orig = { 0, };
-  GValue xform = { 0, }; 
+  GValue orig = G_VALUE_INIT;
+  GValue xform = G_VALUE_INIT;
   GEnumValue values[] = { {0,"0","0"}, {1,"1","1"}}; 
   
  type = g_enum_register_static ("TestEnum", values); 
@@ -50,6 +50,7 @@ test_enum_transformation (void)
  g_value_init (&xform, G_TYPE_CHAR); 
  g_value_transform (&orig, &xform); 
  g_assert (g_value_get_char (&xform) == 1);
+ g_assert (g_value_get_schar (&xform) == 1);
 
  memset (&xform, 0, sizeof (GValue));
  g_value_init (&xform, G_TYPE_UCHAR); 
@@ -92,8 +93,8 @@ static void
 test_gtype_value (void)
 {
   GType type;
-  GValue value = { 0, };
-  GValue copy = { 0, };
+  GValue value = G_VALUE_INIT;
+  GValue copy = G_VALUE_INIT;
 
   g_value_init (&value, G_TYPE_GTYPE);
 
@@ -140,7 +141,7 @@ lcopy (GValue *value, ...)
 static void
 test_collection (void)
 {
-  GValue value = { 0, };
+  GValue value = G_VALUE_INIT;
   gchar *error;
   
   g_value_init (&value, G_TYPE_CHAR);
@@ -233,7 +234,7 @@ test_collection (void)
 static void
 test_copying (void)
 {
-  GValue value = { 0, };
+  GValue value = G_VALUE_INIT;
   gchar *error;
 
   {
@@ -387,7 +388,6 @@ int
 main (int argc, char *argv[])
 {
   g_test_init (&argc, &argv, NULL);
-  g_type_init ();
 
   g_test_add_func ("/gvalue/enum-transformation", test_enum_transformation);
   g_test_add_func ("/gvalue/gtype", test_gtype_value);