summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2006-03-24 18:20:36 (GMT)
committerdgp <dgp@noemail.net>2006-03-24 18:20:36 (GMT)
commitf84ac3ba2b1ed5b5198f5d4a55b42bad37b3dad7 (patch)
treece4fd9f1c5c84359c4aa697db856d29da5478a21 /tests
parent966ff217ed1f2d03ba8ad61cb687c00b3b479029 (diff)
downloadtcl-f84ac3ba2b1ed5b5198f5d4a55b42bad37b3dad7.zip
tcl-f84ac3ba2b1ed5b5198f5d4a55b42bad37b3dad7.tar.gz
tcl-f84ac3ba2b1ed5b5198f5d4a55b42bad37b3dad7.tar.bz2
* generic/tclExecute.c: Revised INST_EXPON implementation to do
calculations in native types as much as possible, moving to mp_ints only when necessary. FossilOrigin-Name: cde770a73fb77b068aa0c1fdc902a29e1d9c5672
Diffstat (limited to 'tests')
-rw-r--r--tests/expr.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test
index 39b8eb8..f747f87 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: expr.test,v 1.51 2006/03/21 18:30:54 dgp Exp $
+# RCS: @(#) $Id: expr.test,v 1.52 2006/03/24 18:20:37 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -1025,6 +1025,12 @@ test expr-23.32 {INST_EXPON: special cases} {expr {wide(1)**wide(1234567)}} 1
test expr-23.33 {INST_EXPON: special cases} {expr {wide(2)**wide(-2)}} 0
test expr-23.34 {INST_EXPON: special cases} {expr {2**0}} 1
test expr-23.35 {INST_EXPON: special cases} {expr {wide(2)**0}} 1
+test expr-23.36 {INST_EXPON: big integer} {expr {10**17}} 1[string repeat 0 17]
+test expr-23.37 {INST_EXPON: big integer} {expr {10**18}} 1[string repeat 0 18]
+test expr-23.38 {INST_EXPON: big integer} {expr {10**19}} 1[string repeat 0 19]
+test expr-23.39 {INST_EXPON: big integer} {
+ expr 1[string repeat 0 30]**2
+} 1[string repeat 0 60]
# Some compilers get this wrong; ensure that we work around it correctly
test expr-24.1 {expr edge cases; shifting} {expr int(5)>>32} 0