Improve error reporting.
authorMatthias Clasen <mclasen@redhat.com>
Tue, 26 Oct 2004 04:16:02 +0000 (04:16 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Tue, 26 Oct 2004 04:16:02 +0000 (04:16 +0000)
2004-10-26  Matthias Clasen  <mclasen@redhat.com>

* tests/strtod-test.c (test_string): Improve error reporting.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-6
ChangeLog.pre-2-8
tests/strtod-test.c

index 8bee809..bb6366c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 8bee809..bb6366c 100644 (file)
@@ -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
index 8bee809..bb6366c 100644 (file)
@@ -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
index 8bee809..bb6366c 100644 (file)
@@ -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
index 8bee809..bb6366c 100644 (file)
@@ -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
index 703f11c..7e45570 100644 (file)
@@ -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);