mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
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
This commit is contained in:
@@ -91,9 +91,9 @@ test_param_strings (void)
|
|||||||
GParamSpec *p;
|
GParamSpec *p;
|
||||||
|
|
||||||
/* test canonicalization */
|
/* 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_nick (p), ==, "My Int");
|
||||||
g_assert_cmpstr (g_param_spec_get_blurb (p), ==, "Blurb");
|
g_assert_cmpstr (g_param_spec_get_blurb (p), ==, "Blurb");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user