mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
make sure expected values are interpreted as doubles
This commit is contained in:
parent
eb35eac3bc
commit
8f4b247a1d
1 changed files with 1 additions and 1 deletions
|
|
@ -2309,7 +2309,7 @@ test_string_to_double(PyObject *self) {
|
||||||
result = PyOS_string_to_double(STR, NULL, NULL); \
|
result = PyOS_string_to_double(STR, NULL, NULL); \
|
||||||
if (result == -1.0 && PyErr_Occurred()) \
|
if (result == -1.0 && PyErr_Occurred()) \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
if (result != expected) { \
|
if (result != (double)expected) { \
|
||||||
msg = "conversion of " STR " to float failed"; \
|
msg = "conversion of " STR " to float failed"; \
|
||||||
goto fail; \
|
goto fail; \
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue