summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2019-12-21 14:19:08 (GMT)
committerdgp <dgp@users.sourceforge.net>2019-12-21 14:19:08 (GMT)
commit1f81e5eb51a6f1fea57a23736af10772fc6abfae (patch)
tree5b1de91e144c5613dedfcd41ad3d1fbbdab1612d /tests
parent6fa04d74e058900e8929c9cbb45c994145691d6b (diff)
downloadtcl-1f81e5eb51a6f1fea57a23736af10772fc6abfae.zip
tcl-1f81e5eb51a6f1fea57a23736af10772fc6abfae.tar.gz
tcl-1f81e5eb51a6f1fea57a23736af10772fc6abfae.tar.bz2
Tests demonstrating the number parsing overflow bugs.
Diffstat (limited to 'tests')
-rw-r--r--tests/expr.test50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/expr.test b/tests/expr.test
index 3a69407..948195b 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -6836,6 +6836,56 @@ test expr-41.2 {exponent underflow} {
expr 1.0e-2147483630
} 0.0
+test expr-41.3 {exponent overflow} {
+ expr 1e2147483647
+} Inf
+test expr-41.4 {exponent overflow} {
+ expr 1e2147483648
+} Inf
+test expr-41.5 {exponent overflow} {
+ expr 100e2147483645
+} Inf
+test expr-41.6 {exponent overflow} {
+ expr 100e2147483646
+} Inf
+test expr-41.7 {exponent overflow} {
+ expr 1.0e2147483647
+} Inf
+test expr-41.8 {exponent overflow} {
+ expr 1.0e2147483648
+} Inf
+test expr-41.9 {exponent overflow} {
+ expr 1.2e2147483647
+} Inf
+test expr-41.10 {exponent overflow} {
+ expr 1.2e2147483648
+} Inf
+
+test expr-41.11 {exponent overflow} {
+ expr 1e-2147483648
+} 0.0
+test expr-41.12 {exponent overflow} {
+ expr 1e-2147483649
+} 0.0
+test expr-41.13 {exponent overflow} {
+ expr 100e-2147483650
+} 0.0
+test expr-41.14 {exponent overflow} {
+ expr 100e-2147483651
+} 0.0
+test expr-41.15 {exponent overflow} {
+ expr 1.0e-2147483648
+} 0.0
+test expr-41.16 {exponent overflow} {
+ expr 1.0e-2147483649
+} 0.0
+test expr-41.17 {exponent overflow} {
+ expr 1.23e-2147483646
+} 0.0
+test expr-41.18 {exponent overflow} {
+ expr 1.23e-2147483647
+} 0.0
+
test expr-42.1 {denormals} ieeeFloatingPoint {
expr 7e-324
} 5e-324