summaryrefslogtreecommitdiffstats
path: root/tests/compExpr-old.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-07-28 18:42:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-07-28 18:42:28 (GMT)
commitcb789f51b77dd4702d548d9aa828a757472b725a (patch)
tree85f757e2612f551d93a44ffbca41b861711fe9b2 /tests/compExpr-old.test
parent97b69e6ac0b3bfe72f1e3e4a490af5a45fb22776 (diff)
downloadtcl-cb789f51b77dd4702d548d9aa828a757472b725a.zip
tcl-cb789f51b77dd4702d548d9aa828a757472b725a.tar.gz
tcl-cb789f51b77dd4702d548d9aa828a757472b725a.tar.bz2
* tests/compExpr-old.test: Still more conversion of "nonPortable"
* tests/error.test: tests into tests with constraints that * tests/expr-old.test: describe the limits of their * tests/expr.test: portability. Also more consolidation * tests/fileName.test: of constraint synonyms. * tests/format.test: wideis64bit, 64bitInts => wideIs64bit * tests/get.test: wideIntegerUnparsed => wideIs32bit * tests/load.test: wideIntExpressions => wideBiggerThanInt * tests/obj.test: * tests/parseExpr.test: Dropped "roundOffBug" constraint that * tests/string.test: protected from buggy sprintf.
Diffstat (limited to 'tests/compExpr-old.test')
-rw-r--r--tests/compExpr-old.test34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/compExpr-old.test b/tests/compExpr-old.test
index 6ac7ff1..f13e0e9 100644
--- a/tests/compExpr-old.test
+++ b/tests/compExpr-old.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: compExpr-old.test,v 1.12 2005/05/10 18:35:17 kennykb Exp $
+# RCS: @(#) $Id: compExpr-old.test,v 1.13 2005/07/28 18:42:28 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -125,7 +125,9 @@ proc do_twelve_days {} {
global xxx
set xxx ""
12days 1 1 1
- string length $xxx
+ set result [string length $xxx]
+ unset xxx
+ return $result
}
# start of tests
@@ -216,16 +218,12 @@ test compExpr-old-3.6 {CompileCondExpr: error compiling false arm} {
catch {expr 2>3?44:2***3} msg
set msg
} {syntax error in expression "2>3?44:2***3": unexpected operator *}
-test compExpr-old-3.7 {CompileCondExpr: long arms & nested cond exprs} {nonPortable} {
- puts "Note: doing test compExpr-old-3.7 which can take several minutes to run"
+test compExpr-old-3.7 {CompileCondExpr: long arms & nested cond exprs} {
hello_world
} {Hello world}
-catch {unset xxx}
-test compExpr-old-3.8 {CompileCondExpr: long arms & nested cond exprs} {nonPortable} {
- puts "Note: doing test compExpr-old-3.8 which can take several minutes to run"
+test compExpr-old-3.8 {CompileCondExpr: long arms & nested cond exprs} {
do_twelve_days
} 2358
-catch {unset xxx}
test compExpr-old-4.1 {CompileLorExpr: just land expr} {expr 1.3&&3.3} 1
test compExpr-old-4.2 {CompileLorExpr: error in land expr} -body {
@@ -359,15 +357,17 @@ test compExpr-old-9.4 {CompileRelationalExpr: just shift expr} {expr {1<<3}} 8
# The following test is different for 32-bit versus 64-bit
# architectures because LONG_MIN is different
-if {int(0x80000000) > 0} {
- test compExpr-old-9.5 {CompileRelationalExpr: shift expr producing LONG_MIN} {nonPortable} {
- expr {1<<63}
- } -9223372036854775808
-} else {
- test compExpr-old-9.5 {CompileRelationalExpr: shift expr producing LONG_MIN} {nonPortable} {
- expr {1<<31}
- } -2147483648
-}
+testConstraint longIs32bit [expr {int(0x80000000) < 0}]
+testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]
+
+test compExpr-old-9.5a {CompileRelationalExpr: shift expr producing LONG_MIN} longIs64bit {
+ expr {1<<63}
+} -9223372036854775808
+
+test compExpr-old-9.5b {CompileRelationalExpr: shift expr producing LONG_MIN} longIs32bit {
+ expr {1<<31}
+} -2147483648
+
test compExpr-old-9.6 {CompileRelationalExpr: error in shift expr} -body {
catch {expr x>>3} msg
set msg