[PATCH 1/2] msvcrt: Test that the normal strtod doesn't handle the "NAN" string
Martin Storsjo
martin at martin.st
Sun Aug 30 15:47:15 CDT 2015
---
dlls/msvcrt/tests/string.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c
index 476f762..d247ba6 100644
--- a/dlls/msvcrt/tests/string.c
+++ b/dlls/msvcrt/tests/string.c
@@ -1728,6 +1728,7 @@ static void test__strtod(void)
const char double3[] = "INF";
const char double4[] = ".21e12";
const char double5[] = "214353e-3";
+ const char double6[] = "NAN";
const char overflow[] = "1d9999999999999999999";
const char white_chars[] = " d10";
@@ -1754,6 +1755,10 @@ static void test__strtod(void)
ok(almost_equal(d, 214.353), "d = %lf\n", d);
ok(end == double5+9, "incorrect end (%d)\n", (int)(end-double5));
+ d = strtod(double6, &end);
+ ok(almost_equal(d, 0), "d = %lf\n", d);
+ ok(end == double6, "incorrect end (%d)\n", (int)(end-double6));
+
d = strtod("12.1d2", NULL);
ok(almost_equal(d, 12.1e2), "d = %lf\n", d);
--
1.8.1.2
More information about the wine-patches
mailing list