[glib: 2/19] tests: Rework GParamSpec canonicalisation test



commit 0815da867425543363e92718937d47639aa413b6
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Nov 12 18:30:47 2019 +0000

    tests: Rework GParamSpec canonicalisation test
    
    The documentation says that parameter names must be alphanumeric (plus
    `-` or `_`) and that canonicalisation turns `_` into `-`.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    Helps: #358

 gobject/tests/param.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gobject/tests/param.c b/gobject/tests/param.c
index 758289bf8..466e7bfe9 100644
--- a/gobject/tests/param.c
+++ b/gobject/tests/param.c
@@ -91,9 +91,9 @@ test_param_strings (void)
   GParamSpec *p;
 
   /* test canonicalization */
-  p = g_param_spec_int ("my_int:bla", "My Int", "Blurb", 0, 20, 10, G_PARAM_READWRITE);
+  p = g_param_spec_int ("my_int", "My Int", "Blurb", 0, 20, 10, G_PARAM_READWRITE);
 
-  g_assert_cmpstr (g_param_spec_get_name (p), ==, "my-int-bla");
+  g_assert_cmpstr (g_param_spec_get_name (p), ==, "my-int");
   g_assert_cmpstr (g_param_spec_get_nick (p), ==, "My Int");
   g_assert_cmpstr (g_param_spec_get_blurb (p), ==, "Blurb");
 


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