|
|
|
@ -142,7 +142,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == 123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == 123); |
|
|
|
|
assert (pp - str == 4); |
|
|
|
|
assert (end - pp == 1); |
|
|
|
|
} |
|
|
|
@ -154,7 +154,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == 123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == 123); |
|
|
|
|
assert (pp - str == 5); |
|
|
|
|
assert (end - pp == 0); |
|
|
|
|
} |
|
|
|
@ -166,7 +166,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == 123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == 123); |
|
|
|
|
assert (pp - str == 7); |
|
|
|
|
assert (end - pp == 0); |
|
|
|
|
} |
|
|
|
@ -178,7 +178,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == 123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == 123); |
|
|
|
|
assert (pp - str == 6); |
|
|
|
|
assert (end - pp == 0); |
|
|
|
|
} |
|
|
|
@ -190,7 +190,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == 123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == 123); |
|
|
|
|
assert (pp - str == 10); |
|
|
|
|
assert (end - pp == 0); |
|
|
|
|
} |
|
|
|
@ -202,7 +202,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == -123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == -123); |
|
|
|
|
assert (pp - str == 13); |
|
|
|
|
assert (end - pp == 0); |
|
|
|
|
} |
|
|
|
@ -214,7 +214,7 @@ main (int argc, char **argv) |
|
|
|
|
|
|
|
|
|
double pv; |
|
|
|
|
assert (hb_parse_double (&pp, end, &pv)); |
|
|
|
|
assert ((int) (pv * 1000.) == -123); |
|
|
|
|
assert ((int) roundf (pv * 1000.) == -123); |
|
|
|
|
assert (pp - str == 8); |
|
|
|
|
assert (end - pp == 0); |
|
|
|
|
} |
|
|
|
|