mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 15:30:07 +00:00
Add tests of more strtod special cases
There is very little test coverage of inputs to strtod-family functions that don't contain anything that can be parsed as a number (one test of ".y" in tst-strtod2), and none that I can see of skipping initial whitespace. Add some tests of these things to tst-strtod2. Tested for x86_64.
This commit is contained in:
parent
b5d3737b30
commit
378039ca57
@ -31,6 +31,20 @@ struct test_strto ## FSUF \
|
||||
{ "0x1px", 1.0 ## LSUF, 3 }, \
|
||||
{ "0x1p+x", 1.0 ## LSUF, 3 }, \
|
||||
{ "0x1p-x", 1.0 ## LSUF, 3 }, \
|
||||
{ "", 0.0 ## LSUF, 0 }, \
|
||||
{ ".", 0.0 ## LSUF, 0 }, \
|
||||
{ "-", 0.0 ## LSUF, 0 }, \
|
||||
{ "-.", 0.0 ## LSUF, 0 }, \
|
||||
{ ".e", 0.0 ## LSUF, 0 }, \
|
||||
{ "-.e", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t.", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t-", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t-.", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t.e", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t-.e", 0.0 ## LSUF, 0 }, \
|
||||
{ " \t\f\r\n\v1", 1.0 ## LSUF, 7 }, \
|
||||
{ " \t\f\r\n\v-1.5e2", -150.0 ## LSUF, 12 }, \
|
||||
{ "INFx", INFINITY, 3 }, \
|
||||
{ "infx", INFINITY, 3 }, \
|
||||
{ "INFINITx", INFINITY, 3 }, \
|
||||
|
Loading…
Reference in New Issue
Block a user