[glib] Add a test for g_variant_builder_add_parsed



commit a4d0038c288587bd2d8b50a7b5b442e6ba0f59a7
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 31 02:14:01 2010 -0400

    Add a test for g_variant_builder_add_parsed

 glib/tests/gvariant.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
index 7da3830..7e228ac 100644
--- a/glib/tests/gvariant.c
+++ b/glib/tests/gvariant.c
@@ -612,6 +612,7 @@ test_gvarianttype (void)
        */
       ctype = G_VARIANT_TYPE (type_string->str);
       g_assert (g_variant_type_equal (ctype, type));
+      g_assert (g_variant_type_hash (ctype) == g_variant_type_hash (type));
       g_assert (g_variant_type_is_subtype_of (ctype, type));
       g_assert (g_variant_type_is_subtype_of (type, ctype));
 
@@ -2868,8 +2869,7 @@ test_varargs (void)
     GVariantBuilder array;
 
     g_variant_builder_init (&array, G_VARIANT_TYPE_ARRAY);
-    g_variant_builder_add (&array, "{sv}", "size",
-                           g_variant_new ("(ii)", 800, 600));
+    g_variant_builder_add_parsed (&array, "{'size', <(%i, %i)> }", 800, 600);
     g_variant_builder_add (&array, "{sv}", "title",
                            g_variant_new_string ("Test case"));
     g_variant_builder_add_value (&array,



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