mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-07 13:20:06 +02: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);
|
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 ();
|
g_variant_type_info_assert_no_infos ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user