From 5a76c5d2f39ad087b5153d458503caabb871c513 Mon Sep 17 00:00:00 2001 From: Lee Duhem Date: Mon, 15 Dec 2014 16:32:08 +0800 Subject: Fix parsing of binary floating point number * tccpp.c (parse_number): `shift' should be 1 while parsing binary floating point number. * tests/tests2/70_floating_point_literals.c: New test cases for floating point number parsing. --- tests/tests2/70_floating_point_literals.expect | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/tests2/70_floating_point_literals.expect (limited to 'tests/tests2/70_floating_point_literals.expect') diff --git a/tests/tests2/70_floating_point_literals.expect b/tests/tests2/70_floating_point_literals.expect new file mode 100644 index 0000000..7eb1efb --- /dev/null +++ b/tests/tests2/70_floating_point_literals.expect @@ -0,0 +1,53 @@ +0.123000 +122999996416.000000 +0.000000 +122999996416.000000 + +123.123001 +123122997002240.000000 +0.000000 +123122997002240.000000 + +123.000000 +123000003231744.000000 +0.000000 +123000003231744.000000 + +123000003231744.000000 +0.000000 +123000003231744.000000 + + +428.000000 +0.000026 +428.000000 + +1756112.000000 +0.104672 +1756592.000000 + +1753088.000000 +0.104492 +1753088.000000 + +1753088.000000 +0.104492 +1753088.000000 + + +3424.000000 +0.000204 +3424.000000 + +1756112.000000 +0.104672 +1756112.000000 + +1753088.000000 +0.104492 +1753088.000000 + +1753088.000000 +0.104492 +1753088.000000 + -- cgit v1.3.1