mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
GVariant test: test parsing of "inf" and "nan"
This commit is contained in:
parent
85633f1182
commit
cd35e2e643
@ -3662,6 +3662,23 @@ test_parses (void)
|
||||
g_free (printed);
|
||||
}
|
||||
|
||||
/* inf/nan mini test */
|
||||
{
|
||||
const gchar *tests[] = { "inf", "-inf", "nan" };
|
||||
GVariant *value;
|
||||
gchar *printed;
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (tests); i++)
|
||||
{
|
||||
GError *error = NULL;
|
||||
value = g_variant_parse (NULL, tests[i], NULL, NULL, &error);
|
||||
printed = g_variant_print (value, FALSE);
|
||||
g_assert_cmpstr (tests[i], ==, printed);
|
||||
g_free (printed);
|
||||
}
|
||||
}
|
||||
|
||||
g_variant_type_info_assert_no_infos ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user