Add some FP test cases, including some parse errors.

Adjust the parsing a bit, and generate 0 values for bad syntax
like the reference version does.
This commit is contained in:
Olaf Seibert
2022-06-19 16:11:59 +02:00
parent 3109f40bd5
commit 3eb7274625
4 changed files with 239 additions and 87 deletions

View File

@@ -662,7 +662,7 @@ int parse_float(
}
DF("float_sign: %d\n", float_sign);
for (;;) {
while (!EOL(*cp)) {
if (isdigit(*cp)) {
/* Can we multiply by 10? */
DF("digit: %c\n", *cp);