summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--tests/compExpr-old.test34
-rw-r--r--tests/error.test8
-rw-r--r--tests/expr-old.test40
-rw-r--r--tests/expr.test217
-rw-r--r--tests/fileName.test6
-rw-r--r--tests/format.test73
-rw-r--r--tests/get.test8
-rw-r--r--tests/load.test6
-rw-r--r--tests/obj.test31
-rw-r--r--tests/parseExpr.test52
-rw-r--r--tests/scan.test7
-rw-r--r--tests/string.test6
13 files changed, 254 insertions, 248 deletions
diff --git a/ChangeLog b/ChangeLog
index 73985b3..5fd0a31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2005-07-28 Don Porter <dgp@users.sourceforge.net>
+
+ * 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.
+
2005-07-28 Donal K. Fellows <dkf@users.sf.net>
* generic/tclPipe.c (TclCreatePipeline): Arrange for POSIX systems to
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
diff --git a/tests/error.test b/tests/error.test
index 0cca88f..ab35c5d 100644
--- a/tests/error.test
+++ b/tests/error.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: error.test,v 1.12 2004/09/30 23:06:49 dgp Exp $
+# RCS: @(#) $Id: error.test,v 1.13 2005/07/28 18:42:28 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -68,10 +68,14 @@ test error-1.7 {simple errors from commands} {
set b
} {wrong # args: should be "catch script ?resultVarName? ?optionVarName?"}
-test error-1.8 {simple errors from commands} {nonPortable} {
+test error-1.8 {simple errors from commands} {
# This test is non-portable: it generates a memory fault on
# machines like DEC Alphas (infinite recursion overflows
# stack?)
+ #
+ # That claims sounds like a bug to be fixed rather than a portability
+ # problem. Anyhow, I believe it's out of date (bug's been fixed) so
+ # this test is re-enabled.
proc p {} {
uplevel 1 catch p error
diff --git a/tests/expr-old.test b/tests/expr-old.test
index 4853e8a..1817e9a 100644
--- a/tests/expr-old.test
+++ b/tests/expr-old.test
@@ -13,7 +13,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-old.test,v 1.25 2005/05/10 18:35:19 kennykb Exp $
+# RCS: @(#) $Id: expr-old.test,v 1.26 2005/07/28 18:42:28 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -252,12 +252,8 @@ test expr-old-4.25 {string operators} {expr {"abd" ne ""}} 1
test expr-old-4.26 {string operators} {expr {"" ne ""}} 0
test expr-old-4.27 {string operators} {expr {"longerstring" eq "shorter"}} 0
test expr-old-4.28 {string operators} {expr {"longerstring" ne "shorter"}} 1
-
-# The following tests are non-portable because on some systems "+"
-# and "-" can be parsed as numbers.
-
-test expr-old-4.29 {string operators} {nonPortable} {expr {"0" == "+"}} 0
-test expr-old-4.30 {string operators} {nonPortable} {expr {"0" == "-"}} 0
+test expr-old-4.29 {string operators} {expr {"0" == "+"}} 0
+test expr-old-4.30 {string operators} {expr {"0" == "-"}} 0
test expr-old-4.31 {string operators} {expr {1?"foo":"bar"}} foo
test expr-old-4.32 {string operators} {expr {0?"foo":"bar"}} bar
@@ -788,17 +784,13 @@ test expr-old-32.24 {math functions in expressions} {
format %.6g [expr abs(66)]
} {66}
-# The following test is different for 32-bit versus 64-bit architectures.
+test expr-old-32.25a {math functions in expressions} {
+ list [catch {expr abs(0x8000000000000000)} msg] $msg
+} {1 {integer value too large to represent}}
-if {int(0x80000000) > 0} {
- test expr-old-32.25a {math functions in expressions} {nonPortable} {
- list [catch {expr abs(0x8000000000000000)} msg] $msg
- } {1 {integer value too large to represent}}
-} else {
- test expr-old-32.25b {math functions in expressions} {nonPortable} {
- list [catch {expr abs(0x80000000)} msg] $msg
- } {1 {integer value too large to represent}}
-}
+test expr-old-32.25b {math functions in expressions} {
+ expr abs(0x80000000)
+} 2147483648
test expr-old-32.26 {math functions in expressions} {
expr double(1)
@@ -929,9 +921,9 @@ test expr-old-34.8 {errors in math functions} -body {
test expr-old-34.9 {errors in math functions} {
list [catch {expr acos(-2.0)} msg] $msg $errorCode
} {1 {domain error: argument not in valid range} {ARITH DOMAIN {domain error: argument not in valid range}}}
-test expr-old-34.10 {errors in math functions} {nonPortable} {
- list [catch {expr pow(-3, 1000001)} msg] $msg $errorCode
-} {1 {floating-point value too large to represent} {ARITH OVERFLOW {floating-point value too large to represent}}}
+test expr-old-34.10 {errors in math functions} {
+ list [catch {expr pow(-3, 1000001)} msg] $msg
+} {0 -Inf}
test expr-old-34.11a {errors in math functions} !ieeeFloatingPoint {
list [catch {expr pow(3, 1000001)} msg] $msg $errorCode
} {1 {floating-point value too large to represent} {ARITH OVERFLOW {floating-point value too large to represent}}}
@@ -983,7 +975,7 @@ test expr-old-36.6 {ExprLooksLikeInt procedure} {
set x { -22}
list [catch {expr {$x+1}} msg] $msg
} {0 -21}
-test expr-old-36.7 {ExprLooksLikeInt procedure} {nonPortable unix} {
+test expr-old-36.7 {ExprLooksLikeInt procedure} {
list [catch {expr nan} msg] $msg
} {1 {domain error: argument not in valid range}}
test expr-old-36.8 {ExprLooksLikeInt procedure} {
@@ -992,9 +984,9 @@ test expr-old-36.8 {ExprLooksLikeInt procedure} {
test expr-old-36.9 {ExprLooksLikeInt procedure} {
list [catch {expr 24E1} msg] $msg
} {0 240.0}
-test expr-old-36.10 {ExprLooksLikeInt procedure} {nonPortable unix} {
- list [catch {expr 78e} msg] $msg
-} {1 {syntax error in expression "78e"}}
+test expr-old-36.10 {ExprLooksLikeInt procedure} -body {
+ expr 78e
+} -returnCodes error -match glob -result {syntax error in expression "78e"*}
# test for [Bug #542588]
test expr-old-36.11 {ExprLooksLikeInt procedure} {
diff --git a/tests/expr.test b/tests/expr.test
index be60bcb..1aad141 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.36 2005/07/27 18:12:36 dgp Exp $
+# RCS: @(#) $Id: expr.test,v 1.37 2005/07/28 18:42:28 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -26,7 +26,7 @@ testConstraint testmathfunctions [expr {
testConstraint longIs32bit [expr {int(0x80000000) < 0}]
testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]
-testConstraint wideis64bit [expr {" 0x8000000000000000 " == "0x8000000000000000"}]
+testConstraint wideIs64bit [expr {(0x80000000 > 0) && (0x8000000000000000 < 0)}]
# Big test for correct ordering of data in [expr]
@@ -228,7 +228,6 @@ test expr-3.6 {CompileCondExpr: error compiling false arm} {
test expr-3.7 {CompileCondExpr: long arms & nested cond exprs} {
hello_world
} {Hello world}
-catch {unset xxx}
test expr-3.8 {CompileCondExpr: long arms & nested cond exprs} {
do_twelve_days
} 2358
@@ -5448,7 +5447,7 @@ test expr-33.2 {parse smallest long value} {longIs32bit} {
} {-2147483648 -2147483648 -2147483648 -2147483648 1 1}
-test expr-33.3 {parse largest wide value} {wideis64bit} {
+test expr-33.3 {parse largest wide value} {wideIs64bit} {
set max_wide_str 9223372036854775807
set max_wide_hex "0x7FFFFFFFFFFFFFFF "
@@ -5466,7 +5465,7 @@ test expr-33.3 {parse largest wide value} {wideis64bit} {
} {9223372036854775807 9223372036854775807 9223372036854775807 9223372036854775807 1 1}
-test expr-33.4 {parse smallest wide value} {wideis64bit} {
+test expr-33.4 {parse smallest wide value} {wideIs64bit} {
set min_wide_str -9223372036854775808
set min_wide_hex "-0x8000000000000000 "
@@ -5977,368 +5976,368 @@ test expr-35.14 {expr edge cases} {longIs32bit} {
set min -9223372036854775808
set max 9223372036854775807
-test expr-36.1 {expr edge cases} {wideis64bit} {
+test expr-36.1 {expr edge cases} {wideIs64bit} {
expr {$min / $min}
} {1}
-test expr-36.2 {expr edge cases} {wideis64bit} {
+test expr-36.2 {expr edge cases} {wideIs64bit} {
expr {$min % $min}
} {0}
-test expr-36.3 {expr edge cases} {wideis64bit} {
+test expr-36.3 {expr edge cases} {wideIs64bit} {
expr {$min / ($min + 1)}
} {1}
-test expr-36.4 {expr edge cases} {wideis64bit} {
+test expr-36.4 {expr edge cases} {wideIs64bit} {
expr {$min % ($min + 1)}
} {-1}
-test expr-36.5 {expr edge cases} {wideis64bit} {
+test expr-36.5 {expr edge cases} {wideIs64bit} {
expr {$min / ($min + 2)}
} {1}
-test expr-36.6 {expr edge cases} {wideis64bit} {
+test expr-36.6 {expr edge cases} {wideIs64bit} {
expr {$min % ($min + 2)}
} {-2}
-test expr-36.7 {expr edge cases} {wideis64bit} {
+test expr-36.7 {expr edge cases} {wideIs64bit} {
expr {$min / ($min + 3)}
} {1}
-test expr-36.8 {expr edge cases} {wideis64bit} {
+test expr-36.8 {expr edge cases} {wideIs64bit} {
expr {$min % ($min + 3)}
} {-3}
-test expr-36.9 {expr edge cases} {wideis64bit} {
+test expr-36.9 {expr edge cases} {wideIs64bit} {
expr {$min / -3}
} {3074457345618258602}
-test expr-36.10 {expr edge cases} {wideis64bit} {
+test expr-36.10 {expr edge cases} {wideIs64bit} {
expr {$min % -3}
} {-2}
-test expr-36.11 {expr edge cases} {wideis64bit} {
+test expr-36.11 {expr edge cases} {wideIs64bit} {
expr {$min / -2}
} {4611686018427387904}
-test expr-36.12 {expr edge cases} {wideis64bit} {
+test expr-36.12 {expr edge cases} {wideIs64bit} {
expr {$min % -2}
} {0}
-test expr-36.13 {expr edge cases} {wideis64bit} {
+test expr-36.13 {expr edge cases} {wideIs64bit} {
expr {$min / -1}
} $min
-test expr-36.14 {expr edge cases} {wideis64bit} {
+test expr-36.14 {expr edge cases} {wideIs64bit} {
expr {$min % -1}
} {0}
-test expr-36.15 {expr edge cases} {wideis64bit} {
+test expr-36.15 {expr edge cases} {wideIs64bit} {
expr {$min * -1}
} $min
-test expr-36.16 {expr edge cases} {wideis64bit} {
+test expr-36.16 {expr edge cases} {wideIs64bit} {
expr {-$min}
} $min
-test expr-36.17 {expr edge cases} {wideis64bit} {
+test expr-36.17 {expr edge cases} {wideIs64bit} {
expr {$min / 1}
} $min
-test expr-36.18 {expr edge cases} {wideis64bit} {
+test expr-36.18 {expr edge cases} {wideIs64bit} {
expr {$min % 1}
} {0}
-test expr-36.19 {expr edge cases} {wideis64bit} {
+test expr-36.19 {expr edge cases} {wideIs64bit} {
expr {$min / 2}
} {-4611686018427387904}
-test expr-36.20 {expr edge cases} {wideis64bit} {
+test expr-36.20 {expr edge cases} {wideIs64bit} {
expr {$min % 2}
} {0}
-test expr-36.21 {expr edge cases} {wideis64bit} {
+test expr-36.21 {expr edge cases} {wideIs64bit} {
expr {$min / 3}
} {-3074457345618258603}
-test expr-36.22 {expr edge cases} {wideis64bit} {
+test expr-36.22 {expr edge cases} {wideIs64bit} {
expr {$min % 3}
} {1}
-test expr-36.23 {expr edge cases} {wideis64bit} {
+test expr-36.23 {expr edge cases} {wideIs64bit} {
expr {$min / ($max - 3)}
} {-2}
-test expr-36.24 {expr edge cases} {wideis64bit} {
+test expr-36.24 {expr edge cases} {wideIs64bit} {
expr {$min % ($max - 3)}
} {9223372036854775800}
-test expr-36.25 {expr edge cases} {wideis64bit} {
+test expr-36.25 {expr edge cases} {wideIs64bit} {
expr {$min / ($max - 2)}
} {-2}
-test expr-36.26 {expr edge cases} {wideis64bit} {
+test expr-36.26 {expr edge cases} {wideIs64bit} {
expr {$min % ($max - 2)}
} {9223372036854775802}
-test expr-36.27 {expr edge cases} {wideis64bit} {
+test expr-36.27 {expr edge cases} {wideIs64bit} {
expr {$min / ($max - 1)}
} {-2}
-test expr-36.28 {expr edge cases} {wideis64bit} {
+test expr-36.28 {expr edge cases} {wideIs64bit} {
expr {$min % ($max - 1)}
} {9223372036854775804}
-test expr-36.29 {expr edge cases} {wideis64bit} {
+test expr-36.29 {expr edge cases} {wideIs64bit} {
expr {$min / $max}
} {-2}
-test expr-36.30 {expr edge cases} {wideis64bit} {
+test expr-36.30 {expr edge cases} {wideIs64bit} {
expr {$min % $max}
} {9223372036854775806}
-test expr-36.31 {expr edge cases} {wideis64bit} {
+test expr-36.31 {expr edge cases} {wideIs64bit} {
expr {$max / $max}
} {1}
-test expr-36.32 {expr edge cases} {wideis64bit} {
+test expr-36.32 {expr edge cases} {wideIs64bit} {
expr {$max % $max}
} {0}
-test expr-36.33 {expr edge cases} {wideis64bit} {
+test expr-36.33 {expr edge cases} {wideIs64bit} {
expr {$max / ($max - 1)}
} {1}
-test expr-36.34 {expr edge cases} {wideis64bit} {
+test expr-36.34 {expr edge cases} {wideIs64bit} {
expr {$max % ($max - 1)}
} {1}
-test expr-36.35 {expr edge cases} {wideis64bit} {
+test expr-36.35 {expr edge cases} {wideIs64bit} {
expr {$max / ($max - 2)}
} {1}
-test expr-36.36 {expr edge cases} {wideis64bit} {
+test expr-36.36 {expr edge cases} {wideIs64bit} {
expr {$max % ($max - 2)}
} {2}
-test expr-36.37 {expr edge cases} {wideis64bit} {
+test expr-36.37 {expr edge cases} {wideIs64bit} {
expr {$max / ($max - 3)}
} {1}
-test expr-36.38 {expr edge cases} {wideis64bit} {
+test expr-36.38 {expr edge cases} {wideIs64bit} {
expr {$max % ($max - 3)}
} {3}
-test expr-36.39 {expr edge cases} {wideis64bit} {
+test expr-36.39 {expr edge cases} {wideIs64bit} {
expr {$max / 3}
} {3074457345618258602}
-test expr-36.40 {expr edge cases} {wideis64bit} {
+test expr-36.40 {expr edge cases} {wideIs64bit} {
expr {$max % 3}
} {1}
-test expr-36.41 {expr edge cases} {wideis64bit} {
+test expr-36.41 {expr edge cases} {wideIs64bit} {
expr {$max / 2}
} {4611686018427387903}
-test expr-36.42 {expr edge cases} {wideis64bit} {
+test expr-36.42 {expr edge cases} {wideIs64bit} {
expr {$max % 2}
} {1}
-test expr-36.43 {expr edge cases} {wideis64bit} {
+test expr-36.43 {expr edge cases} {wideIs64bit} {
expr {$max / 1}
} $max
-test expr-36.44 {expr edge cases} {wideis64bit} {
+test expr-36.44 {expr edge cases} {wideIs64bit} {
expr {$max % 1}
} {0}
-test expr-36.45 {expr edge cases} {wideis64bit} {
+test expr-36.45 {expr edge cases} {wideIs64bit} {
expr {$max / -1}
} "-$max"
-test expr-36.46 {expr edge cases} {wideis64bit} {
+test expr-36.46 {expr edge cases} {wideIs64bit} {
expr {$max % -1}
} {0}
-test expr-36.47 {expr edge cases} {wideis64bit} {
+test expr-36.47 {expr edge cases} {wideIs64bit} {
expr {$max / -2}
} {-4611686018427387904}
-test expr-36.48 {expr edge cases} {wideis64bit} {
+test expr-36.48 {expr edge cases} {wideIs64bit} {
expr {$max % -2}
} {-1}
-test expr-36.49 {expr edge cases} {wideis64bit} {
+test expr-36.49 {expr edge cases} {wideIs64bit} {
expr {$max / -3}
} {-3074457345618258603}
-test expr-36.50 {expr edge cases} {wideis64bit} {
+test expr-36.50 {expr edge cases} {wideIs64bit} {
expr {$max % -3}
} {-2}
-test expr-36.51 {expr edge cases} {wideis64bit} {
+test expr-36.51 {expr edge cases} {wideIs64bit} {
expr {$max / ($min + 3)}
} {-2}
-test expr-36.52 {expr edge cases} {wideis64bit} {
+test expr-36.52 {expr edge cases} {wideIs64bit} {
expr {$max % ($min + 3)}
} {-9223372036854775803}
-test expr-36.53 {expr edge cases} {wideis64bit} {
+test expr-36.53 {expr edge cases} {wideIs64bit} {
expr {$max / ($min + 2)}
} {-2}
-test expr-36.54 {expr edge cases} {wideis64bit} {
+test expr-36.54 {expr edge cases} {wideIs64bit} {
expr {$max % ($min + 2)}
} {-9223372036854775805}
-test expr-36.55 {expr edge cases} {wideis64bit} {
+test expr-36.55 {expr edge cases} {wideIs64bit} {
expr {$max / ($min + 1)}
} {-1}
-test expr-36.56 {expr edge cases} {wideis64bit} {
+test expr-36.56 {expr edge cases} {wideIs64bit} {
expr {$max % ($min + 1)}
} {0}
-test expr-36.57 {expr edge cases} {wideis64bit} {
+test expr-36.57 {expr edge cases} {wideIs64bit} {
expr {$max / $min}
} {-1}
-test expr-36.58 {expr edge cases} {wideis64bit} {
+test expr-36.58 {expr edge cases} {wideIs64bit} {
expr {$max % $min}
} {-1}
-test expr-36.59 {expr edge cases} {wideis64bit} {
+test expr-36.59 {expr edge cases} {wideIs64bit} {
expr {($min + 1) / ($max - 1)}
} {-2}
-test expr-36.60 {expr edge cases} {wideis64bit} {
+test expr-36.60 {expr edge cases} {wideIs64bit} {
expr {($min + 1) % ($max - 1)}
} {9223372036854775805}
-test expr-36.61 {expr edge cases} {wideis64bit} {
+test expr-36.61 {expr edge cases} {wideIs64bit} {
expr {($max - 1) / ($min + 1)}
} {-1}
-test expr-36.62 {expr edge cases} {wideis64bit} {
+test expr-36.62 {expr edge cases} {wideIs64bit} {
expr {($max - 1) % ($min + 1)}
} {-1}
-test expr-36.63 {expr edge cases} {wideis64bit} {
+test expr-36.63 {expr edge cases} {wideIs64bit} {
expr {($max - 1) / $min}
} {-1}
-test expr-36.64 {expr edge cases} {wideis64bit} {
+test expr-36.64 {expr edge cases} {wideIs64bit} {
expr {($max - 1) % $min}
} {-2}
-test expr-36.65 {expr edge cases} {wideis64bit} {
+test expr-36.65 {expr edge cases} {wideIs64bit} {
expr {($max - 2) / $min}
} {-1}
-test expr-36.66 {expr edge cases} {wideis64bit} {
+test expr-36.66 {expr edge cases} {wideIs64bit} {
expr {($max - 2) % $min}
} {-3}
-test expr-36.67 {expr edge cases} {wideis64bit} {
+test expr-36.67 {expr edge cases} {wideIs64bit} {
expr {($max - 3) / $min}
} {-1}
-test expr-36.68 {expr edge cases} {wideis64bit} {
+test expr-36.68 {expr edge cases} {wideIs64bit} {
expr {($max - 3) % $min}
} {-4}
-test expr-36.69 {expr edge cases} {wideis64bit} {
+test expr-36.69 {expr edge cases} {wideIs64bit} {
expr {-3 / $min}
} {0}
-test expr-36.70 {expr edge cases} {wideis64bit} {
+test expr-36.70 {expr edge cases} {wideIs64bit} {
expr {-3 % $min}
} {-3}
-test expr-36.71 {expr edge cases} {wideis64bit} {
+test expr-36.71 {expr edge cases} {wideIs64bit} {
expr {-2 / $min}
} {0}
-test expr-36.72 {expr edge cases} {wideis64bit} {
+test expr-36.72 {expr edge cases} {wideIs64bit} {
expr {-2 % $min}
} {-2}
-test expr-36.73 {expr edge cases} {wideis64bit} {
+test expr-36.73 {expr edge cases} {wideIs64bit} {
expr {-1 / $min}
} {0}
-test expr-36.74 {expr edge cases} {wideis64bit} {
+test expr-36.74 {expr edge cases} {wideIs64bit} {
expr {-1 % $min}
} {-1}
-test expr-36.75 {expr edge cases} {wideis64bit} {
+test expr-36.75 {expr edge cases} {wideIs64bit} {
expr {0 / $min}
} {0}
-test expr-36.76 {expr edge cases} {wideis64bit} {
+test expr-36.76 {expr edge cases} {wideIs64bit} {
expr {0 % $min}
} {0}
-test expr-36.77 {expr edge cases} {wideis64bit} {
+test expr-36.77 {expr edge cases} {wideIs64bit} {
expr {0 / ($min + 1)}
} {0}
-test expr-36.78 {expr edge cases} {wideis64bit} {
+test expr-36.78 {expr edge cases} {wideIs64bit} {
expr {0 % ($min + 1)}
} {0}
-test expr-36.79 {expr edge cases} {wideis64bit} {
+test expr-36.79 {expr edge cases} {wideIs64bit} {
expr {1 / $min}
} {-1}
-test expr-36.80 {expr edge cases} {wideis64bit} {
+test expr-36.80 {expr edge cases} {wideIs64bit} {
expr {1 % $min}
} {-9223372036854775807}
-test expr-36.81 {expr edge cases} {wideis64bit} {
+test expr-36.81 {expr edge cases} {wideIs64bit} {
expr {1 / ($min + 1)}
} {-1}
-test expr-36.82 {expr edge cases} {wideis64bit} {
+test expr-36.82 {expr edge cases} {wideIs64bit} {
expr {1 % ($min + 1)}
} {-9223372036854775806}
-test expr-36.83 {expr edge cases} {wideis64bit} {
+test expr-36.83 {expr edge cases} {wideIs64bit} {
expr {2 / $min}
} {-1}
-test expr-36.84 {expr edge cases} {wideis64bit} {
+test expr-36.84 {expr edge cases} {wideIs64bit} {
expr {2 % $min}
} {-9223372036854775806}
-test expr-36.85 {expr edge cases} {wideis64bit} {
+test expr-36.85 {expr edge cases} {wideIs64bit} {
expr {2 / ($min + 1)}
} {-1}
-test expr-36.86 {expr edge cases} {wideis64bit} {
+test expr-36.86 {expr edge cases} {wideIs64bit} {
expr {2 % ($min + 1)}
} {-9223372036854775805}
-test expr-36.87 {expr edge cases} {wideis64bit} {
+test expr-36.87 {expr edge cases} {wideIs64bit} {
expr {3 / $min}
} {-1}
-test expr-36.88 {expr edge cases} {wideis64bit} {
+test expr-36.88 {expr edge cases} {wideIs64bit} {
expr {3 % $min}
} {-9223372036854775805}
-test expr-36.89 {expr edge cases} {wideis64bit} {
+test expr-36.89 {expr edge cases} {wideIs64bit} {
expr {3 / ($min + 1)}
} {-1}
-test expr-36.90 {expr edge cases} {wideis64bit} {
+test expr-36.90 {expr edge cases} {wideIs64bit} {
expr {3 % ($min + 1)}
} {-9223372036854775804}
-test expr-37.1 {expr edge cases} {wideis64bit} {
+test expr-37.1 {expr edge cases} {wideIs64bit} {
set dividend $max
set divisor 2
set q [expr {$dividend / $divisor}]
@@ -6346,7 +6345,7 @@ test expr-37.1 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($divisor * $q) + $r}]
} {4611686018427387903 * 2 + 1 = 9223372036854775807}
-test expr-37.2 {expr edge cases} {wideis64bit} {
+test expr-37.2 {expr edge cases} {wideIs64bit} {
set dividend [expr {$max - 1}]
set divisor 2
set q [expr {$dividend / $divisor}]
@@ -6354,7 +6353,7 @@ test expr-37.2 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {4611686018427387903 * 2 + 0 = 9223372036854775806}
-test expr-37.3 {expr edge cases} {wideis64bit} {
+test expr-37.3 {expr edge cases} {wideIs64bit} {
set dividend [expr {$max - 2}]
set divisor 2
set q [expr {$dividend / $divisor}]
@@ -6362,7 +6361,7 @@ test expr-37.3 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {4611686018427387902 * 2 + 1 = 9223372036854775805}
-test expr-37.4 {expr edge cases} {wideis64bit} {
+test expr-37.4 {expr edge cases} {wideIs64bit} {
set dividend $max
set divisor 3
set q [expr {$dividend / $divisor}]
@@ -6370,7 +6369,7 @@ test expr-37.4 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {3074457345618258602 * 3 + 1 = 9223372036854775807}
-test expr-37.5 {expr edge cases} {wideis64bit} {
+test expr-37.5 {expr edge cases} {wideIs64bit} {
set dividend [expr {$max - 1}]
set divisor 3
set q [expr {$dividend / $divisor}]
@@ -6378,7 +6377,7 @@ test expr-37.5 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {3074457345618258602 * 3 + 0 = 9223372036854775806}
-test expr-37.6 {expr edge cases} {wideis64bit} {
+test expr-37.6 {expr edge cases} {wideIs64bit} {
set dividend [expr {$max - 2}]
set divisor 3
set q [expr {$dividend / $divisor}]
@@ -6386,7 +6385,7 @@ test expr-37.6 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {3074457345618258601 * 3 + 2 = 9223372036854775805}
-test expr-37.7 {expr edge cases} {wideis64bit} {
+test expr-37.7 {expr edge cases} {wideIs64bit} {
set dividend $min
set divisor 2
set q [expr {$dividend / $divisor}]
@@ -6394,7 +6393,7 @@ test expr-37.7 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {-4611686018427387904 * 2 + 0 = -9223372036854775808}
-test expr-37.8 {expr edge cases} {wideis64bit} {
+test expr-37.8 {expr edge cases} {wideIs64bit} {
set dividend [expr {$min + 1}]
set divisor 2
set q [expr {$dividend / $divisor}]
@@ -6402,7 +6401,7 @@ test expr-37.8 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {-4611686018427387904 * 2 + 1 = -9223372036854775807}
-test expr-37.9 {expr edge cases} {wideis64bit} {
+test expr-37.9 {expr edge cases} {wideIs64bit} {
set dividend [expr {$min + 2}]
set divisor 2
set q [expr {$dividend / $divisor}]
@@ -6410,7 +6409,7 @@ test expr-37.9 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {-4611686018427387903 * 2 + 0 = -9223372036854775806}
-test expr-37.10 {expr edge cases} {wideis64bit} {
+test expr-37.10 {expr edge cases} {wideIs64bit} {
# Multiplication overflows 64 bit type here,
# so when the 1 is added it overflows
# again and we end up back at min.
@@ -6421,7 +6420,7 @@ test expr-37.10 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {-3074457345618258603 * 3 + 1 = -9223372036854775808}
-test expr-37.11 {expr edge cases} {wideis64bit} {
+test expr-37.11 {expr edge cases} {wideIs64bit} {
set dividend $min
set divisor -3
set q [expr {$dividend / $divisor}]
@@ -6429,7 +6428,7 @@ test expr-37.11 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {3074457345618258602 * -3 + -2 = -9223372036854775808}
-test expr-37.12 {expr edge cases} {wideis64bit} {
+test expr-37.12 {expr edge cases} {wideIs64bit} {
set dividend $min
set divisor $min
set q [expr {$dividend / $divisor}]
@@ -6437,7 +6436,7 @@ test expr-37.12 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {1 * -9223372036854775808 + 0 = -9223372036854775808}
-test expr-37.13 {expr edge cases} {wideis64bit} {
+test expr-37.13 {expr edge cases} {wideIs64bit} {
set dividend $min
set divisor [expr {$min + 1}]
set q [expr {$dividend / $divisor}]
@@ -6445,7 +6444,7 @@ test expr-37.13 {expr edge cases} {wideis64bit} {
list $q * $divisor + $r = [expr {($q * $divisor) + $r}]
} {1 * -9223372036854775807 + -1 = -9223372036854775808}
-test expr-37.14 {expr edge cases} {wideis64bit} {
+test expr-37.14 {expr edge cases} {wideIs64bit} {
set dividend $min
set divisor [expr {$min + 2}]
set q [expr {$dividend / $divisor}]
diff --git a/tests/fileName.test b/tests/fileName.test
index 5768aac..979dd63 100644
--- a/tests/fileName.test
+++ b/tests/fileName.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: fileName.test,v 1.47 2005/07/27 18:12:42 dgp Exp $
+# RCS: @(#) $Id: fileName.test,v 1.48 2005/07/28 18:42:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -666,11 +666,11 @@ if {[testConstraint testsetplatform]} {
testsetplatform $platform
}
-test filename-10.23 {Tcl_TranslateFileName} {unix nonPortable} {
+test filename-10.23 {Tcl_TranslateFileName} {nonPortable} {
# this test fails if ~ouster is not /home/ouster
list [catch {testtranslatefilename ~ouster} msg] $msg
} {0 /home/ouster}
-test filename-10.24 {Tcl_TranslateFileName} {unix nonPortable} {
+test filename-10.24 {Tcl_TranslateFileName} {nonPortable} {
# this test fails if ~ouster is not /home/ouster
list [catch {testtranslatefilename ~ouster/foo} msg] $msg
} {0 /home/ouster/foo}
diff --git a/tests/format.test b/tests/format.test
index afb18b0..a6e2242 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -10,32 +10,30 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: format.test,v 1.20 2005/06/17 23:41:03 dkf Exp $
+# RCS: @(#) $Id: format.test,v 1.21 2005/07/28 18:42:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
namespace import -force ::tcltest::*
}
-# The following code is needed because some versions of SCO Unix have
-# a round-off error in sprintf which would cause some of the tests to
-# fail. Someday I hope this code shouldn't be necessary (code added
-# 9/9/91).
-
-testConstraint roundOffBug [expr {"[format %7.1e 68.514]" != "6.8e+01"}]
-
test format-1.1 {integer formatting} {
format "%*d %d %d %d" 6 34 16923 -12 -1
} { 34 16923 -12 -1}
-test format-1.2 {integer formatting} {nonPortable} {
+test format-1.2 {integer formatting} {
format "%4d %4d %4d %4d %d %#x %#X" 6 34 16923 -12 -1 14 12
} { 6 34 16923 -12 -1 0xe 0XC}
# %u output depends on word length, so this test is not portable.
+testConstraint longIs32bit [expr {int(0x80000000) < 0}]
+testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]
-test format-1.3 {integer formatting} {nonPortable} {
+test format-1.3 {integer formatting} longIs32bit {
format "%4u %4u %4u %4u %d %#o" 6 34 16923 -12 -1 0
} { 6 34 16923 4294967284 -1 0}
+test format-1.3.1 {integer formatting} longIs64bit {
+ format "%4u %4u %4u %4u %d %#o" 6 34 16923 -12 -1 0
+} { 6 34 16923 18446744073709551604 -1 0}
test format-1.4 {integer formatting} {
format "%-4d %-4i %-4d %-4ld" 6 34 16923 -12 -1
} {6 34 16923 -12 }
@@ -49,21 +47,36 @@ test format-1.6 {integer formatting} {
# Printing negative numbers in hex or octal format depends on word
# length, so these tests are not portable.
-test format-1.7 {integer formatting} {nonPortable} {
+test format-1.7 {integer formatting} longIs32bit {
format "%4x %4x %4x %4x" 6 34 16923 -12 -1
} { 6 22 421b fffffff4}
-test format-1.8 {integer formatting} {nonPortable} {
+test format-1.7.1 {integer formatting} longIs64bit {
+ format "%4x %4x %4x %4x" 6 34 16923 -12 -1
+} { 6 22 421b fffffffffffffff4}
+test format-1.8 {integer formatting} longIs32bit {
format "%#x %#X %#X %#x" 6 34 16923 -12 -1
} {0x6 0X22 0X421B 0xfffffff4}
-test format-1.9 {integer formatting} {nonPortable} {
+test format-1.8.1 {integer formatting} longIs64bit {
+ format "%#x %#X %#X %#x" 6 34 16923 -12 -1
+} {0x6 0X22 0X421B 0xfffffffffffffff4}
+test format-1.9 {integer formatting} longIs32bit {
format "%#20x %#20x %#20x %#20x" 6 34 16923 -12 -1
} { 0x6 0x22 0x421b 0xfffffff4}
-test format-1.10 {integer formatting} {nonPortable} {
+test format-1.9.1 {integer formatting} longIs64bit {
+ format "%#20x %#20x %#20x %#20x" 6 34 16923 -12 -1
+} { 0x6 0x22 0x421b 0xfffffffffffffff4}
+test format-1.10 {integer formatting} longIs32bit {
format "%-#20x %-#20x %-#20x %-#20x" 6 34 16923 -12 -1
} {0x6 0x22 0x421b 0xfffffff4 }
-test format-1.11 {integer formatting} {nonPortable} {
+test format-1.10.1 {integer formatting} longIs64bit {
+ format "%-#20x %-#20x %-#20x %-#20x" 6 34 16923 -12 -1
+} {0x6 0x22 0x421b 0xfffffffffffffff4 }
+test format-1.11 {integer formatting} longIs32bit {
format "%-#20o %#-20o %#-20o %#-20o" 6 34 16923 -12 -1
} {06 042 041033 037777777764 }
+test format-1.11.1 {integer formatting} longIs64bit {
+ format "%-#20o %#-20o %#-20o %#-20o" 6 34 16923 -12 -1
+} {06 042 041033 01777777777777777777764}
test format-2.1 {string formatting} {
format "%s %s %c %s" abcd {This is a very long test string.} 120 x
@@ -130,19 +143,19 @@ test format-4.1 {e and f formats} {eformat} {
test format-4.2 {e and f formats} {eformat} {
format "%20e %20e %20e %20e" 34.2e12 68.514 -.125 -16000. .000053
} { 3.420000e+13 6.851400e+01 -1.250000e-01 -1.600000e+04}
-test format-4.3 {e and f formats} {eformat roundOffBug} {
+test format-4.3 {e and f formats} {eformat} {
format "%.1e %.1e %.1e %.1e" 34.2e12 68.514 -.126 -16000. .000053
} {3.4e+13 6.9e+01 -1.3e-01 -1.6e+04}
-test format-4.4 {e and f formats} {eformat roundOffBug} {
+test format-4.4 {e and f formats} {eformat} {
format "%020e %020e %020e %020e" 34.2e12 68.514 -.126 -16000. .000053
} {000000003.420000e+13 000000006.851400e+01 -00000001.260000e-01 -00000001.600000e+04}
-test format-4.5 {e and f formats} {eformat roundOffBug} {
+test format-4.5 {e and f formats} {eformat} {
format "%7.1e %7.1e %7.1e %7.1e" 34.2e12 68.514 -.126 -16000. .000053
} {3.4e+13 6.9e+01 -1.3e-01 -1.6e+04}
-test format-4.6 {e and f formats roundOffBug} {
+test format-4.6 {e and f formats} {
format "%f %f %f %f" 34.2e12 68.514 -.125 -16000. .000053
} {34200000000000.000000 68.514000 -0.125000 -16000.000000}
-test format-4.7 {e and f formats} {nonPortable} {
+test format-4.7 {e and f formats} {
format "%.4f %.4f %.4f %.4f %.4f" 34.2e12 68.514 -.125 -16000. .000053
} {34200000000000.0000 68.5140 -0.1250 -16000.0000 0.0001}
test format-4.8 {e and f formats} {eformat} {
@@ -355,13 +368,13 @@ test format-9.1 {long result} {
format {1111 2222 3333 4444 5555 6666 7777 8888 9999 aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk llll mmmm nnnn oooo pppp qqqq rrrr ssss tttt uuuu vvvv wwww xxxx yyyy zzzz AAAA BBBB CCCC DDDD EEEE FFFF GGGG %s %s} $a $a
} {1111 2222 3333 4444 5555 6666 7777 8888 9999 aaaa bbbb cccc dddd eeee ffff gggg hhhh iiii jjjj kkkk llll mmmm nnnn oooo pppp qqqq rrrr ssss tttt uuuu vvvv wwww xxxx yyyy zzzz AAAA BBBB CCCC DDDD EEEE FFFF GGGG 1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}
-test format-10.1 {"h" format specifier} {nonPortable} {
+test format-10.1 {"h" format specifier} {
format %hd 0xffff
} -1
-test format-10.2 {"h" format specifier} {nonPortable} {
+test format-10.2 {"h" format specifier} {
format %hx 0x10fff
} fff
-test format-10.3 {"h" format specifier} {nonPortable} {
+test format-10.3 {"h" format specifier} {
format %hd 0x10000
} 0
test format-10.4 {"h" format specifier} {
@@ -490,18 +503,18 @@ for {set i 290} {$i < 400} {incr i} {
append b "x"
}
-::tcltest::testConstraint 64bitInts \
- [expr {0x80000000 > 0}]
-::tcltest::testConstraint wideIntExpressions \
+::tcltest::testConstraint wideIs64bit \
+ [expr {(0x80000000 > 0) && (0x8000000000000000 < 0)}]
+::tcltest::testConstraint wideBiggerThanInt \
[expr {wide(0x80000000) != int(0x80000000)}]
-test format-17.1 {testing %d with wide} {64bitInts wideIntExpressions} {
+test format-17.1 {testing %d with wide} {wideIs64bit wideBiggerThanInt} {
list [catch {format %d 7810179016327718216} msg] $msg
} {1 {integer value too large to represent}}
-test format-17.2 {testing %ld with wide} {64bitInts} {
+test format-17.2 {testing %ld with wide} {wideIs64bit} {
format %ld 7810179016327718216
} 7810179016327718216
-test format-17.3 {testing %ld with non-wide} {64bitInts} {
+test format-17.3 {testing %ld with non-wide} {wideIs64bit} {
format %ld 42
} 42
test format-17.4 {testing %l with non-integer} {
@@ -525,7 +538,7 @@ test format-18.1 {do not demote existing numeric values} {
format %08x $b
lappend result [expr {$a == $b}]
} {1 1 1 1}
-test format-18.2 {do not demote existing numeric values} {wideIntExpressions} {
+test format-18.2 {do not demote existing numeric values} {wideBiggerThanInt} {
set a [expr {0xaaaaaaaaaa + 1}]
set b 0xaaaaaaaaab
list [catch {format %08x $a} msg] $msg [expr {$a == $b}]
diff --git a/tests/get.test b/tests/get.test
index ceed09d..46301e8 100644
--- a/tests/get.test
+++ b/tests/get.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: get.test,v 1.10 2005/07/27 18:12:43 dgp Exp $
+# RCS: @(#) $Id: get.test,v 1.11 2005/07/28 18:42:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -74,9 +74,9 @@ test get-2.2 {Tcl_GetInt procedure} {
test get-2.3 {Tcl_GetInt procedure} {
list [catch {format %g clip} msg] $msg
} {1 {expected floating-point number but got "clip"}}
-test get-2.4 {Tcl_GetInt procedure} {nonPortable} {
- list [catch {format %g .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001} msg] $msg $errorCode
-} {1 {floating-point value too small to represent} {ARITH UNDERFLOW {floating-point value too small to represent}}}
+test get-2.4 {Tcl_GetInt procedure} {
+ format %g .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
+} 0
test get-3.1 {Tcl_GetInt(FromObj), bad numbers} {
# SF bug #634856
diff --git a/tests/load.test b/tests/load.test
index 62f317e..d1bdc04 100644
--- a/tests/load.test
+++ b/tests/load.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: load.test,v 1.13 2004/06/19 00:42:35 dgp Exp $
+# RCS: @(#) $Id: load.test,v 1.14 2005/07/28 18:42:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -129,8 +129,10 @@ test load-5.1 {file name not specified and no static package: pick default} \
# On some platforms, like SunOS 4.1.3, these tests can't be run because
# they cause the process to exit.
+#
+# As of 2005, such ancient broken systems no longer matter.
-test load-6.1 {errors loading file} [list $dll $loaded nonPortable] {
+test load-6.1 {errors loading file} [list $dll $loaded] {
catch {load foo foo}
} {1}
diff --git a/tests/obj.test b/tests/obj.test
index 76e008e..e905698 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -11,37 +11,16 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: obj.test,v 1.17 2005/07/27 18:12:43 dgp Exp $
+# RCS: @(#) $Id: obj.test,v 1.18 2005/07/28 18:42:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
-# Procedure to determine the integer range of the machine
-proc int_range {} {
- for {set MIN_INT 1} {$MIN_INT > 0} {} {
- set MIN_INT [expr {$MIN_INT << 1}]
- }
- set MAX_INT [expr {~ $MIN_INT}]
- return [list $MIN_INT $MAX_INT]
-}
-
-# Procedure to determine the range of wide integers on the machine.
-proc wide_range {} {
- for {set MIN_WIDE [expr {wide(1)}] } {$MIN_WIDE > wide(0)} {} {
- set MIN_WIDE [expr {$MIN_WIDE << 1}]
- }
- set MAX_WIDE [expr {~ $MIN_WIDE}]
- return [list $MIN_WIDE $MAX_WIDE]
-}
-
-foreach {MIN_INT MAX_INT} [int_range] break
-foreach {MIN_WIDE MAX_WIDE} [wide_range] break
-
testConstraint testobj [llength [info commands testobj]]
testConstraint longIs32bit [expr {int(0x80000000) < 0}]
-testConstraint wideBiggerThanInt [expr {$MAX_WIDE > wide($MAX_INT)}]
+testConstraint wideBiggerThanInt [expr {wide(0x80000000) != int(0x80000000)}]
test obj-1.1 {Tcl_AppendAllObjTypes, and InitTypeTable, Tcl_RegisterObjType} testobj {
set r 1
@@ -446,7 +425,7 @@ test obj-23.4 {Tcl_GetIntFromObj, error converting from "empty string"} testobj
lappend result [catch {testintobj div10 1} msg]
lappend result $msg
} {{} 1 {expected integer but got ""}}
-test obj-23.5 {Tcl_GetIntFromObj, integer too large to represent as non-long error} {testobj nonPortable} {
+test obj-23.5 {Tcl_GetIntFromObj, integer too large to represent as non-long error} {testobj} {
set result ""
lappend result [testobj newobj 1]
lappend result [testintobj inttoobigtest 1]
@@ -490,7 +469,7 @@ test obj-25.5 {SetIntFromAny, error parsing string} testobj {
lappend result [catch {testintobj mult10 1} msg]
lappend result $msg
} {x17 1 {expected integer but got "x17"}}
-test obj-25.6 {SetIntFromAny, integer too large} {testobj nonPortable} {
+test obj-25.6 {SetIntFromAny, integer too large} {testobj} {
set result ""
lappend result [teststringobj set 1 123456789012345678901]
lappend result [catch {testintobj mult10 1} msg]
@@ -605,7 +584,7 @@ test obj-31.5 {regenerate string rep of "end--bigInteger"} testobj {
testobj convert 1 end-offset
testobj invalidateStringRep 1
} end--2147483647
-test obj-31.6 {regenerate string rep of "end--bigInteger"} {testobj nonPortable} {
+test obj-31.6 {regenerate string rep of "end--bigInteger"} {testobj longIs32bit} {
testobj freeallvars
teststringobj set 1 end--0x80000000
testobj convert 1 end-offset
diff --git a/tests/parseExpr.test b/tests/parseExpr.test
index 2fc4fed..d337ced 100644
--- a/tests/parseExpr.test
+++ b/tests/parseExpr.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: parseExpr.test,v 1.14 2005/05/10 18:35:22 kennykb Exp $
+# RCS: @(#) $Id: parseExpr.test,v 1.15 2005/07/28 18:42:32 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -25,7 +25,7 @@ testConstraint testexprparser [llength [info commands testexprparser]]
# Some tests only work if wide integers (>32bit) are not found to be
# integers at all.
-testConstraint wideIntegerUnparsed [expr {-1 == 0xffffffff}]
+testConstraint wideIs32bit [expr {0x80000000 < 0}]
# Big test for correct ordering of data in [expr]
@@ -93,7 +93,7 @@ test parseExpr-1.1 {Tcl_ParseExpr procedure, computing string length} testexprpa
test parseExpr-1.2 {Tcl_ParseExpr procedure, computing string length} testexprparser {
testexprparser "1 + 2" -1
} {- {} 0 subexpr {1 + 2} 5 operator + 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 {}}
-test parseExpr-1.3 {Tcl_ParseExpr procedure, error getting initial lexeme} {testexprparser wideIntegerUnparsed} {
+test parseExpr-1.3 {Tcl_ParseExpr procedure, error getting initial lexeme} {testexprparser wideIs32bit} {
list [catch {testexprparser {12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-1.4 {Tcl_ParseExpr procedure, error in conditional expression} \
@@ -119,7 +119,7 @@ test parseExpr-2.3 {ParseCondExpr procedure, next lexeme isn't "?"} testexprpars
test parseExpr-2.4 {ParseCondExpr procedure, next lexeme is "?"} testexprparser {
testexprparser {1+2 ? 3 : 4} -1
} {- {} 0 subexpr {1+2 ? 3 : 4} 11 operator ? 0 subexpr 1+2 5 operator + 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 subexpr 4 1 text 4 0 {}}
-test parseExpr-2.5 {ParseCondExpr procedure, bad lexeme after "?"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-2.5 {ParseCondExpr procedure, bad lexeme after "?"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1+2 ? 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-2.6 {ParseCondExpr procedure, valid "then" subexpression} testexprparser {
@@ -156,7 +156,7 @@ test parseExpr-3.3 {ParseLorExpr procedure, next lexeme isn't "||"} testexprpars
test parseExpr-3.4 {ParseLorExpr procedure, next lexeme is "||"} testexprparser {
testexprparser {1&&2 || 3} -1
} {- {} 0 subexpr {1&&2 || 3} 9 operator || 0 subexpr 1&&2 5 operator && 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-3.5 {ParseLorExpr procedure, bad lexeme after "||"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-3.5 {ParseLorExpr procedure, bad lexeme after "||"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1&&2 || 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-3.6 {ParseLorExpr procedure, valid RHS subexpression} testexprparser {
@@ -182,7 +182,7 @@ test parseExpr-4.3 {ParseLandExpr procedure, next lexeme isn't "&&"} testexprpar
test parseExpr-4.4 {ParseLandExpr procedure, next lexeme is "&&"} testexprparser {
testexprparser {1|2 && 3} -1
} {- {} 0 subexpr {1|2 && 3} 9 operator && 0 subexpr 1|2 5 operator | 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-4.5 {ParseLandExpr procedure, bad lexeme after "&&"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-4.5 {ParseLandExpr procedure, bad lexeme after "&&"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1|2 && 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-4.6 {ParseLandExpr procedure, valid RHS subexpression} testexprparser {
@@ -208,7 +208,7 @@ test parseExpr-5.3 {ParseBitOrExpr procedure, next lexeme isn't "|"} testexprpar
test parseExpr-5.4 {ParseBitOrExpr procedure, next lexeme is "|"} testexprparser {
testexprparser {1^2 | 3} -1
} {- {} 0 subexpr {1^2 | 3} 9 operator | 0 subexpr 1^2 5 operator ^ 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-5.5 {ParseBitOrExpr procedure, bad lexeme after "|"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-5.5 {ParseBitOrExpr procedure, bad lexeme after "|"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1^2 | 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-5.6 {ParseBitOrExpr procedure, valid RHS subexpression} testexprparser {
@@ -234,7 +234,7 @@ test parseExpr-6.3 {ParseBitXorExpr procedure, next lexeme isn't "^"} testexprpa
test parseExpr-6.4 {ParseBitXorExpr procedure, next lexeme is "^"} testexprparser {
testexprparser {1&2 ^ 3} -1
} {- {} 0 subexpr {1&2 ^ 3} 9 operator ^ 0 subexpr 1&2 5 operator & 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-6.5 {ParseBitXorExpr procedure, bad lexeme after "^"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-6.5 {ParseBitXorExpr procedure, bad lexeme after "^"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1&2 ^ 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-6.6 {ParseBitXorExpr procedure, valid RHS subexpression} testexprparser {
@@ -260,7 +260,7 @@ test parseExpr-7.3 {ParseBitAndExpr procedure, next lexeme isn't "&"} testexprpa
test parseExpr-7.4 {ParseBitAndExpr procedure, next lexeme is "&"} testexprparser {
testexprparser {1>2 & 3} -1
} {- {} 0 subexpr {1>2 & 3} 9 operator & 0 subexpr 1>2 5 operator > 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-7.5 {ParseBitAndExpr procedure, bad lexeme after "&"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-7.5 {ParseBitAndExpr procedure, bad lexeme after "&"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1==2 & 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-7.6 {ParseBitAndExpr procedure, valid RHS subexpression} testexprparser {
@@ -289,7 +289,7 @@ test parseExpr-8.4 {ParseEqualityExpr procedure, next lexeme is "==" or "!="} te
test parseExpr-8.5 {ParseEqualityExpr procedure, next lexeme is "==" or "!="} testexprparser {
testexprparser {1<2 != 3} -1
} {- {} 0 subexpr {1<2 != 3} 9 operator != 0 subexpr 1<2 5 operator < 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-8.6 {ParseEqualityExpr procedure, bad lexeme after "==" or "!="} {testexprparser wideIntegerUnparsed} {
+test parseExpr-8.6 {ParseEqualityExpr procedure, bad lexeme after "==" or "!="} {testexprparser wideIs32bit} {
list [catch {testexprparser {1<2 == 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-8.7 {ParseEqualityExpr procedure, valid RHS subexpression} testexprparser {
@@ -324,7 +324,7 @@ test parseExpr-9.6 {ParseRelationalExpr procedure, next lexeme is relational op}
test parseExpr-9.7 {ParseRelationalExpr procedure, next lexeme is relational op} testexprparser {
testexprparser {1<<2 >= 3} -1
} {- {} 0 subexpr {1<<2 >= 3} 9 operator >= 0 subexpr 1<<2 5 operator << 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-9.8 {ParseRelationalExpr procedure, bad lexeme after relational op} {testexprparser wideIntegerUnparsed} {
+test parseExpr-9.8 {ParseRelationalExpr procedure, bad lexeme after relational op} {testexprparser wideIs32bit} {
list [catch {testexprparser {1<<2 < 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-9.9 {ParseRelationalExpr procedure, valid RHS subexpression} testexprparser {
@@ -353,7 +353,7 @@ test parseExpr-10.4 {ParseShiftExpr procedure, next lexeme is "<<" or ">>"} test
test parseExpr-10.5 {ParseShiftExpr procedure, next lexeme is "<<" or ">>"} testexprparser {
testexprparser {1+2 >> 3} -1
} {- {} 0 subexpr {1+2 >> 3} 9 operator >> 0 subexpr 1+2 5 operator + 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-10.6 {ParseShiftExpr procedure, bad lexeme after "<<" or ">>"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-10.6 {ParseShiftExpr procedure, bad lexeme after "<<" or ">>"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1+2 << 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-10.7 {ParseShiftExpr procedure, valid RHS subexpression} testexprparser {
@@ -382,7 +382,7 @@ test parseExpr-11.4 {ParseAddExpr procedure, next lexeme is "+" or "-"} testexpr
test parseExpr-11.5 {ParseAddExpr procedure, next lexeme is "+" or "-"} testexprparser {
testexprparser {1*2 - 3} -1
} {- {} 0 subexpr {1*2 - 3} 9 operator - 0 subexpr 1*2 5 operator * 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-11.6 {ParseAddExpr procedure, bad lexeme after "+" or "-"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-11.6 {ParseAddExpr procedure, bad lexeme after "+" or "-"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1*2 + 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-11.7 {ParseAddExpr procedure, valid RHS subexpression} testexprparser {
@@ -411,7 +411,7 @@ test parseExpr-12.4 {ParseAddExpr procedure, next lexeme is "+" or "-"} testexpr
test parseExpr-12.5 {ParseAddExpr procedure, next lexeme is "+" or "-"} testexprparser {
testexprparser {1*2 - 3} -1
} {- {} 0 subexpr {1*2 - 3} 9 operator - 0 subexpr 1*2 5 operator * 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-12.6 {ParseAddExpr procedure, bad lexeme after "+" or "-"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-12.6 {ParseAddExpr procedure, bad lexeme after "+" or "-"} {testexprparser wideIs32bit} {
list [catch {testexprparser {1*2 + 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-12.7 {ParseAddExpr procedure, valid RHS subexpression} testexprparser {
@@ -426,7 +426,7 @@ test parseExpr-12.8 {ParseAddExpr procedure, error in RHS subexpression} \
test parseExpr-13.1 {ParseMultiplyExpr procedure, valid LHS unary subexpr} testexprparser {
testexprparser {+2 * 3} -1
} {- {} 0 subexpr {+2 * 3} 7 operator * 0 subexpr +2 3 operator + 0 subexpr 2 1 text 2 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-13.2 {ParseMultiplyExpr procedure, error in LHS unary subexpr} {testexprparser wideIntegerUnparsed} {
+test parseExpr-13.2 {ParseMultiplyExpr procedure, error in LHS unary subexpr} {testexprparser wideIs32bit} {
list [catch {testexprparser {-12345678901234567890 * 3} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-13.3 {ParseMultiplyExpr procedure, next lexeme isn't "*", "/", or "%"} testexprparser {
@@ -441,7 +441,7 @@ test parseExpr-13.5 {ParseMultiplyExpr procedure, next lexeme is "*", "/", or "%
test parseExpr-13.6 {ParseMultiplyExpr procedure, next lexeme is "*", "/", or "%"} testexprparser {
testexprparser {+-456 % 3} -1
} {- {} 0 subexpr {+-456 % 3} 9 operator % 0 subexpr +-456 5 operator + 0 subexpr -456 3 operator - 0 subexpr 456 1 text 456 0 subexpr 3 1 text 3 0 {}}
-test parseExpr-13.7 {ParseMultiplyExpr procedure, bad lexeme after "*", "/", or "%"} {testexprparser wideIntegerUnparsed} {
+test parseExpr-13.7 {ParseMultiplyExpr procedure, bad lexeme after "*", "/", or "%"} {testexprparser wideIs32bit} {
list [catch {testexprparser {--++5 / 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-13.8 {ParseMultiplyExpr procedure, valid RHS subexpression} testexprparser {
@@ -465,7 +465,7 @@ test parseExpr-14.3 {ParseUnaryExpr procedure, first token is unary operator} te
test parseExpr-14.4 {ParseUnaryExpr procedure, first token is unary operator} testexprparser {
testexprparser {!2} -1
} {- {} 0 subexpr !2 3 operator ! 0 subexpr 2 1 text 2 0 {}}
-test parseExpr-14.5 {ParseUnaryExpr procedure, error in lexeme after unary op} {testexprparser wideIntegerUnparsed} {
+test parseExpr-14.5 {ParseUnaryExpr procedure, error in lexeme after unary op} {testexprparser wideIs32bit} {
list [catch {testexprparser {-12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-14.6 {ParseUnaryExpr procedure, simple unary expr after unary op} testexprparser {
@@ -486,14 +486,14 @@ test parseExpr-14.10 {ParseUnaryExpr procedure, first token is not unary op} tes
test parseExpr-14.11 {ParseUnaryExpr procedure, not unary expr, complex primary expr} testexprparser {
testexprparser {(1+2)} -1
} {- {} 0 subexpr 1+2 5 operator + 0 subexpr 1 1 text 1 0 subexpr 2 1 text 2 0 {}}
-test parseExpr-14.12 {ParseUnaryExpr procedure, not unary expr, error in primary expr} {testexprparser wideIntegerUnparsed} {
+test parseExpr-14.12 {ParseUnaryExpr procedure, not unary expr, error in primary expr} {testexprparser wideIs32bit} {
list [catch {testexprparser {(12345678901234567890)} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-15.1 {ParsePrimaryExpr procedure, just parenthesized subexpr} testexprparser {
testexprparser {({abc}/{def})} -1
} {- {} 0 subexpr {{abc}/{def}} 5 operator / 0 subexpr {{abc}} 1 text abc 0 subexpr {{def}} 1 text def 0 {}}
-test parseExpr-15.2 {ParsePrimaryExpr procedure, bad lexeme after "("} {testexprparser wideIntegerUnparsed} {
+test parseExpr-15.2 {ParsePrimaryExpr procedure, bad lexeme after "("} {testexprparser wideIs32bit} {
list [catch {testexprparser {(12345678901234567890)} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-15.3 {ParsePrimaryExpr procedure, valid parenthesized subexpr} testexprparser {
@@ -557,7 +557,7 @@ test parseExpr-15.21 {ParsePrimaryExpr procedure, primary is braced string with
test parseExpr-15.22 {ParsePrimaryExpr procedure, primary is function call} testexprparser {
testexprparser {foo(123)} -1
} {- {} 0 subexpr foo(123) 3 operator foo 0 subexpr 123 1 text 123 0 {}}
-test parseExpr-15.23 {ParsePrimaryExpr procedure, bad lexeme after function name} {testexprparser wideIntegerUnparsed} {
+test parseExpr-15.23 {ParsePrimaryExpr procedure, bad lexeme after function name} {testexprparser wideIs32bit} {
list [catch {testexprparser {foo 12345678901234567890 123)} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-15.24 {ParsePrimaryExpr procedure, lexeme after function name isn't "("} \
@@ -565,7 +565,7 @@ test parseExpr-15.24 {ParsePrimaryExpr procedure, lexeme after function name isn
list [catch {testexprparser {foo 27.4 123)} -1} msg] $msg
} -match glob \
-result {1 {syntax error in expression "foo 27.4 123)": * preceding $*}}
-test parseExpr-15.25 {ParsePrimaryExpr procedure, bad lexeme after "("} {testexprparser wideIntegerUnparsed} {
+test parseExpr-15.25 {ParsePrimaryExpr procedure, bad lexeme after "("} {testexprparser wideIs32bit} {
list [catch {testexprparser {foo(12345678901234567890)} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-15.26 {ParsePrimaryExpr procedure, function call, one arg} testexprparser {
@@ -580,13 +580,13 @@ test parseExpr-15.28 {ParsePrimaryExpr procedure, error in function arg} testexp
test parseExpr-15.29 {ParsePrimaryExpr procedure, function call, comma after arg} testexprparser {
testexprparser {foo(27-2, (-2*[foo]))} -1
} {- {} 0 subexpr {foo(27-2, (-2*[foo]))} 15 operator foo 0 subexpr 27-2 5 operator - 0 subexpr 27 1 text 27 0 subexpr 2 1 text 2 0 subexpr {-2*[foo]} 7 operator * 0 subexpr -2 3 operator - 0 subexpr 2 1 text 2 0 subexpr {[foo]} 1 command {[foo]} 0 {}}
-test parseExpr-15.30 {ParsePrimaryExpr procedure, bad lexeme after comma} {testexprparser wideIntegerUnparsed} {
+test parseExpr-15.30 {ParsePrimaryExpr procedure, bad lexeme after comma} {testexprparser wideIs32bit} {
list [catch {testexprparser {foo(123, 12345678901234567890)} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-15.31 {ParsePrimaryExpr procedure, lexeme not "," or ")" after arg} testexprparser {
list [catch {testexprparser {foo(123 [foo])} -1} msg] $msg
} {1 {syntax error in expression "foo(123 [foo])": missing close parenthesis at end of function call}}
-test parseExpr-15.32 {ParsePrimaryExpr procedure, bad lexeme after primary} {testexprparser wideIntegerUnparsed} {
+test parseExpr-15.32 {ParsePrimaryExpr procedure, bad lexeme after primary} {testexprparser wideIs32bit} {
list [catch {testexprparser {123 12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-15.33 {ParsePrimaryExpr procedure, comma-specific message} testexprparser {
@@ -617,7 +617,7 @@ test parseExpr-16.3 {GetLexeme procedure, no lexeme after whitespace} testexprpa
test parseExpr-16.4 {GetLexeme procedure, integer lexeme} testexprparser {
testexprparser {000} -1
} {- {} 0 subexpr 000 1 text 000 0 {}}
-test parseExpr-16.5 {GetLexeme procedure, integer lexeme too big} {testexprparser wideIntegerUnparsed} {
+test parseExpr-16.5 {GetLexeme procedure, integer lexeme too big} {testexprparser wideIs32bit} {
list [catch {testexprparser {12345678901234567890} -1} msg] $msg
} {1 {integer value too large to represent}}
test parseExpr-16.6 {GetLexeme procedure, bad integer lexeme} -constraints testexprparser -body {
@@ -629,10 +629,10 @@ test parseExpr-16.7 {GetLexeme procedure, double lexeme} testexprparser {
test parseExpr-16.8 {GetLexeme procedure, double lexeme} testexprparser {
testexprparser {.123} -1
} {- {} 0 subexpr .123 1 text .123 0 {}}
-test parseExpr-16.9 {GetLexeme procedure, double lexeme} {testexprparser nonPortable unix} {
+test parseExpr-16.9 {GetLexeme procedure, double lexeme} {testexprparser unix} {
testexprparser {nan} -1
} {- {} 0 subexpr nan 1 text nan 0 {}}
-test parseExpr-16.10 {GetLexeme procedure, double lexeme} {testexprparser nonPortable unix} {
+test parseExpr-16.10 {GetLexeme procedure, double lexeme} {testexprparser unix} {
testexprparser {NaN} -1
} {- {} 0 subexpr NaN 1 text NaN 0 {}}
test parseExpr-16.11a {GetLexeme procedure, bad double lexeme too big} {testexprparser && !ieeeFloatingPoint} {
diff --git a/tests/scan.test b/tests/scan.test
index 893a45d..2bb6626 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -11,14 +11,15 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: scan.test,v 1.16 2005/05/10 18:35:23 kennykb Exp $
+# RCS: @(#) $Id: scan.test,v 1.17 2005/07/28 18:42:33 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
namespace import -force ::tcltest::*
}
-::tcltest::testConstraint 64bitInts [expr {0x80000000 > 0}]
+::tcltest::testConstraint wideIs64bit \
+ [expr {(0x80000000 > 0) && (0x8000000000000000 < 0)}]
test scan-1.1 {BuildCharSet, CharInSet} {
list [scan foo {%[^o]} x] $x
@@ -417,7 +418,7 @@ test scan-5.11 {integer scanning} {nonPortable} {
list [scan "4294967280 4294967280" "%u %d" a b] $a \
[expr {$b == -16 || $b == 0x7fffffff}]
} {2 4294967280 1}
-test scan-5.12 {integer scanning} {64bitInts} {
+test scan-5.12 {integer scanning} {wideIs64bit} {
set a {}; set b {}; set c {}
list [scan "7810179016327718216,6c63546f6c6c6548,661432506755433062510" \
%ld,%lx,%lo a b c] $a $b $c
diff --git a/tests/string.test b/tests/string.test
index 2cfd78a..2402657 100644
--- a/tests/string.test
+++ b/tests/string.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: string.test,v 1.50 2005/07/23 02:59:59 mdejong Exp $
+# RCS: @(#) $Id: string.test,v 1.51 2005/07/28 18:42:33 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -411,10 +411,12 @@ test string-6.37 {string is double, false on int overflow} {
list [string is double -fail var [largest_int]0] $var
} {0 -1}
# string-6.38 removed, underflow on input is no longer an error.
-test string-6.39 {string is double, false} {nonPortable} {
+test string-6.39 {string is double, false} {
# This test is non-portable because IRIX thinks
# that .e1 is a valid double - this is really a bug
# on IRIX as .e1 should NOT be a valid double
+ #
+ # Portable now. Tcl 8.5 does its own double parsing.
list [string is double -fail var .e1] $var
} {0 0}