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:
Philip Withnall
2019-11-12 18:30:47 +00:00
parent b080b456a6
commit 0815da8674

View File

@@ -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");