mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
Add a testcase for the previous fix.
2004-11-25 Matthias Clasen <mclasen@redhat.com> * tests/strtod-test.c (main): Add a testcase for the previous fix. * glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats starting with a decimal point, like .75 (#156421, Hans Breuer)
This commit is contained in:
parent
43fde23cee
commit
6b69bf8866
@ -1,3 +1,10 @@
|
||||
2004-11-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (main): Add a testcase for the previous fix.
|
||||
|
||||
* glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats
|
||||
starting with a decimal point, like .75 (#156421, Hans Breuer)
|
||||
|
||||
Thu Nov 25 14:02:43 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib/abicheck.sh: filter out G_GNUC stuff when doing the compare.
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-11-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (main): Add a testcase for the previous fix.
|
||||
|
||||
* glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats
|
||||
starting with a decimal point, like .75 (#156421, Hans Breuer)
|
||||
|
||||
Thu Nov 25 14:02:43 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib/abicheck.sh: filter out G_GNUC stuff when doing the compare.
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-11-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (main): Add a testcase for the previous fix.
|
||||
|
||||
* glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats
|
||||
starting with a decimal point, like .75 (#156421, Hans Breuer)
|
||||
|
||||
Thu Nov 25 14:02:43 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib/abicheck.sh: filter out G_GNUC stuff when doing the compare.
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-11-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (main): Add a testcase for the previous fix.
|
||||
|
||||
* glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats
|
||||
starting with a decimal point, like .75 (#156421, Hans Breuer)
|
||||
|
||||
Thu Nov 25 14:02:43 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib/abicheck.sh: filter out G_GNUC stuff when doing the compare.
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-11-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* tests/strtod-test.c (main): Add a testcase for the previous fix.
|
||||
|
||||
* glib/gstrfuncs.c (g_ascii_strtod): Make it work again for floats
|
||||
starting with a decimal point, like .75 (#156421, Hans Breuer)
|
||||
|
||||
Thu Nov 25 14:02:43 2004 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* glib/abicheck.sh: filter out G_GNUC stuff when doing the compare.
|
||||
|
@ -386,7 +386,7 @@ g_ascii_strtod (const gchar *nptr,
|
||||
|
||||
end = p;
|
||||
}
|
||||
else if (g_ascii_isdigit (*p))
|
||||
else if (g_ascii_isdigit (*p) || *p == '.')
|
||||
{
|
||||
while (g_ascii_isdigit (*p))
|
||||
p++;
|
||||
|
@ -95,6 +95,7 @@ main ()
|
||||
test_string ("-nan", -our_nan, FALSE, 0);
|
||||
test_string ("INF", our_inf, FALSE, 0);
|
||||
test_string ("-infinity", -our_inf, FALSE, 0);
|
||||
test_string ("-.75,0", -0.75, TRUE, 4);
|
||||
|
||||
d = 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0;
|
||||
g_assert (d == g_ascii_strtod (g_ascii_dtostr (buffer, sizeof (buffer), d), NULL));
|
||||
|
Loading…
Reference in New Issue
Block a user