[glib: 5/8] test-gvariant: Remove some hardcoded strings



commit 422d83cbaa8b88a2f952f16ce3b76d569489994d
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Tue Oct 30 20:54:39 2018 +0100

    test-gvariant: Remove some hardcoded strings
    
    Signed-off-by: Christophe Fergeau <cfergeau redhat com>

 glib/tests/gvariant.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
index 969a7ddeb..bb7fae624 100644
--- a/glib/tests/gvariant.c
+++ b/glib/tests/gvariant.c
@@ -3077,9 +3077,9 @@ test_varargs (void)
     gsize i;
 
     g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
-    g_variant_builder_add (&builder, "s", "/foo");
-    g_variant_builder_add (&builder, "s", "/bar");
-    g_variant_builder_add (&builder, "s", "/baz");
+    g_variant_builder_add (&builder, "s", test_strs[0]);
+    g_variant_builder_add (&builder, "s", test_strs[1]);
+    g_variant_builder_add (&builder, "s", test_strs[2]);
     value = g_variant_new("(as^as^a&s)", &builder, strvector, strvector);
     g_variant_iter_init (&tuple, value);
     g_variant_iter_next (&tuple, "as", &array);
@@ -3151,9 +3151,9 @@ test_varargs (void)
 
     /* next test */
     g_variant_builder_init (&builder, G_VARIANT_TYPE ("aay"));
-    g_variant_builder_add (&builder, "^ay", "/foo");
-    g_variant_builder_add (&builder, "^ay", "/bar");
-    g_variant_builder_add (&builder, "^ay", "/baz");
+    g_variant_builder_add (&builder, "^ay", test_strs[0]);
+    g_variant_builder_add (&builder, "^ay", test_strs[1]);
+    g_variant_builder_add (&builder, "^ay", test_strs[2]);
     value = g_variant_new ("(aay^aay^a&ay)", &builder, strvector, strvector);
     g_variant_iter_init (&tuple, value);
     g_variant_iter_next (&tuple, "aay", &array);
@@ -3204,9 +3204,9 @@ test_varargs (void)
     gsize i;
 
     g_variant_builder_init (&builder, G_VARIANT_TYPE_OBJECT_PATH_ARRAY);
-    g_variant_builder_add (&builder, "o", "/foo");
-    g_variant_builder_add (&builder, "o", "/bar");
-    g_variant_builder_add (&builder, "o", "/baz");
+    g_variant_builder_add (&builder, "o", test_strs[0]);
+    g_variant_builder_add (&builder, "o", test_strs[1]);
+    g_variant_builder_add (&builder, "o", test_strs[2]);
     value = g_variant_new("(ao^ao^a&o)", &builder, strvector, strvector);
     g_variant_iter_init (&tuple, value);
     g_variant_iter_next (&tuple, "ao", &array);


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