summaryrefslogtreecommitdiffstats
path: root/tests/get.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2005-07-27 18:12:23 (GMT)
committerdgp <dgp@noemail.net>2005-07-27 18:12:23 (GMT)
commit8d39859c42448e64905f881dd7bddd700e6d2645 (patch)
treeef92791aebce3cc91ebd625875211b7595c68aed /tests/get.test
parent8b92ad0d712dd4ff2d9008c043aaa73ea2d06304 (diff)
downloadtcl-8d39859c42448e64905f881dd7bddd700e6d2645.zip
tcl-8d39859c42448e64905f881dd7bddd700e6d2645.tar.gz
tcl-8d39859c42448e64905f881dd7bddd700e6d2645.tar.bz2
* tests/expr.test: Consolidated equivalent constraints into
* tests/fileName.test: single definitions and (more precise) names: * tests/get.test: longis32bit, 32bit, !intsAre64bit => longIs32bit * tests/listObj.test: empty => emptyTest; winOnly => win * tests/obj.test: intsAre64bit => longIs64bit Also updated some "nonPortable" tests to use constraints that mark precisely what about them isn't portable, so the tests can run where they work. FossilOrigin-Name: ec63acc455d4b6b047c316616e844acafb9ca701
Diffstat (limited to 'tests/get.test')
-rw-r--r--tests/get.test22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/get.test b/tests/get.test
index a04e131..ceed09d 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.9 2004/05/19 10:38:24 dkf Exp $
+# RCS: @(#) $Id: get.test,v 1.10 2005/07/27 18:12:43 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -18,7 +18,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
}
testConstraint testgetint [llength [info commands testgetint]]
-testConstraint intsAre64bit [expr {int(0x80000000) > 0}]
+testConstraint longIs32bit [expr {int(0x80000000) < 0}]
+testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}]
+#testConstraint longIsMoreThan32bit [expr {![testConstraint longIs32bit]}]
test get-1.1 {Tcl_GetInt procedure} testgetint {
testgetint 44 { 22}
@@ -38,28 +40,28 @@ test get-1.5 {Tcl_GetInt procedure} testgetint {
test get-1.6 {Tcl_GetInt procedure} testgetint {
list [catch {testgetint 44 {16 x}} msg] $msg
} {1 {expected integer but got "16 x"}}
-test get-1.7 {Tcl_GetInt procedure} {testgetint intsAre64bit} {
+test get-1.7 {Tcl_GetInt procedure} {testgetint longIs64bit} {
list [catch {testgetint 44 18446744073709551616} msg] $msg $errorCode
} {1 {integer value too large to represent} {ARITH IOVERFLOW {integer value too large to represent}}}
-test get-1.8 {Tcl_GetInt procedure} {testgetint intsAre64bit} {
+test get-1.8 {Tcl_GetInt procedure} {testgetint longIs64bit} {
list [catch {testgetint 18446744073709551614} msg] $msg
} {0 -2}
-test get-1.9 {Tcl_GetInt procedure} {testgetint intsAre64bit} {
+test get-1.9 {Tcl_GetInt procedure} {testgetint longIs64bit} {
list [catch {testgetint +18446744073709551614} msg] $msg
} {0 -2}
-test get-1.10 {Tcl_GetInt procedure} {testgetint intsAre64bit} {
+test get-1.10 {Tcl_GetInt procedure} {testgetint longIs64bit} {
list [catch {testgetint -18446744073709551614} msg] $msg
} {0 2}
-test get-1.11 {Tcl_GetInt procedure} {testgetint && !intsAre64bit} {
+test get-1.11 {Tcl_GetInt procedure} {testgetint longIs32bit} {
list [catch {testgetint 44 4294967296} msg] $msg $errorCode
} {1 {integer value too large to represent} {ARITH IOVERFLOW {integer value too large to represent}}}
-test get-1.12 {Tcl_GetInt procedure} {testgetint && !intsAre64bit} {
+test get-1.12 {Tcl_GetInt procedure} {testgetint longIs32bit} {
list [catch {testgetint 4294967294} msg] $msg
} {0 -2}
-test get-1.13 {Tcl_GetInt procedure} {testgetint && !intsAre64bit} {
+test get-1.13 {Tcl_GetInt procedure} {testgetint longIs32bit} {
list [catch {testgetint +4294967294} msg] $msg
} {0 -2}
-test get-1.14 {Tcl_GetInt procedure} {testgetint && !intsAre64bit} {
+test get-1.14 {Tcl_GetInt procedure} {testgetint longIs32bit} {
list [catch {testgetint -4294967294} msg] $msg
} {0 2}