aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/70_floating_point_literals.expect
diff options
context:
space:
mode:
authorLee Duhem <lee.duhem@gmail.com>2014-12-15 16:32:08 +0800
committerLee Duhem <lee.duhem@gmail.com>2014-12-15 16:32:08 +0800
commit5a76c5d2f39ad087b5153d458503caabb871c513 (patch)
tree5958d4e0b7b521603c13ee6e571ee7b93dce8166 /tests/tests2/70_floating_point_literals.expect
parent20a5845a4789f7c4fee8126584dcf25fc75c391f (diff)
downloadtinycc-5a76c5d2f39ad087b5153d458503caabb871c513.tar.gz
tinycc-5a76c5d2f39ad087b5153d458503caabb871c513.tar.bz2
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.
Diffstat (limited to 'tests/tests2/70_floating_point_literals.expect')
-rw-r--r--tests/tests2/70_floating_point_literals.expect53
1 files changed, 53 insertions, 0 deletions
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
+