}
static void
-test_parse_invalid (void)
-{
- const gchar * const strs[] =
- {
- /* Incomplete UTF-8 sequence */
- "\xfd",
- /* Ridiculously long input */
- "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
- "12345678901234567890123456789012345678901234567890123456789012345678901234567890",
- };
- gsize i;
-
- for (i = 0; i < G_N_ELEMENTS (strs); i++)
- {
- GDate *d = g_date_new ();
-
- g_test_message ("Test %" G_GSIZE_FORMAT, i);
- g_date_set_parse (d, strs[i]);
-
- g_assert_false (g_date_valid (d));
-
- g_date_free (d);
- }
-}
-
-static void
test_parse_locale_change (void)
{
/* Checks that g_date_set_parse correctly changes locale specific data as
g_test_add_func ("/date/julian", test_julian_constructor);
g_test_add_func ("/date/dates", test_dates);
g_test_add_func ("/date/parse", test_parse);
- g_test_add_func ("/date/parse/invalid", test_parse_invalid);
g_test_add_func ("/date/parse_locale_change", test_parse_locale_change);
g_test_add_func ("/date/month_substring", test_month_substring);
g_test_add_func ("/date/month_names", test_month_names);