mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Improve error reporting.
2004-10-26 Matthias Clasen <mclasen@redhat.com> * tests/strtod-test.c (test_string): Improve error reporting.
This commit is contained in:
parent
5c38cfa58d
commit
491732c99d
@ -1,3 +1,7 @@
|
||||
2004-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (test_string): Improve error reporting.
|
||||
|
||||
Mon Oct 25 15:05:18 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* autogen.sh: rm autom4te.cache, since it might interfere with
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (test_string): Improve error reporting.
|
||||
|
||||
Mon Oct 25 15:05:18 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* autogen.sh: rm autom4te.cache, since it might interfere with
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (test_string): Improve error reporting.
|
||||
|
||||
Mon Oct 25 15:05:18 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* autogen.sh: rm autom4te.cache, since it might interfere with
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (test_string): Improve error reporting.
|
||||
|
||||
Mon Oct 25 15:05:18 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* autogen.sh: rm autom4te.cache, since it might interfere with
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-10-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (test_string): Improve error reporting.
|
||||
|
||||
Mon Oct 25 15:05:18 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* autogen.sh: rm autom4te.cache, since it might interfere with
|
||||
|
@ -27,11 +27,11 @@ test_string (char *number, double res, gboolean check_end, int correct_len)
|
||||
setlocale (LC_NUMERIC, locales[l]);
|
||||
d = g_ascii_strtod (number, &end);
|
||||
if (d != res)
|
||||
g_print ("g_ascii_strtod for locale %s failed\n", locales[l]);
|
||||
g_print ("g_ascii_strtod on \"%s\" for locale %s failed\n", number, locales[l]);
|
||||
if (check_end && end - number != correct_len)
|
||||
g_print ("g_ascii_strtod for locale %s endptr was wrong\n", locales[l]);
|
||||
g_print ("g_ascii_strtod on \"%s\" for locale %s endptr was wrong, leftover: %s\n", number, locales[l], end);
|
||||
if (!check_end && end - number != strlen (number))
|
||||
g_print ("g_ascii_strtod for locale %s endptr was wrong\n", locales[l]);
|
||||
g_print ("g_ascii_strtod on \"%s\" for locale %s endptr was wrong, leftover: %s\n", number, locales[l], end);
|
||||
}
|
||||
|
||||
g_free (number);
|
||||
@ -50,6 +50,7 @@ main ()
|
||||
test_string ("-123.123", -123.123, FALSE, 0);
|
||||
test_string ("-123.123e2", -123.123e2, FALSE, 0);
|
||||
test_string ("-123.123e-2", -123.123e-2, FALSE, 0);
|
||||
test_string ("1e1", 1e1, FALSE, 0);
|
||||
test_string ("5.4", 5.4, TRUE, 3);
|
||||
test_string ("5.4,5.5", 5.4, TRUE, 3);
|
||||
test_string ("5,4", 5.0, TRUE, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user