diff options
author | dgp <dgp@users.sourceforge.net> | 2005-07-27 18:12:24 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-07-27 18:12:24 (GMT) |
commit | e5c93914d5de3897143d17c46b6e4faf138db73c (patch) | |
tree | ef92791aebce3cc91ebd625875211b7595c68aed /tests/get.test | |
parent | 2430f497f1715d87f7c9b5f9374320566776fb6f (diff) | |
download | tcl-e5c93914d5de3897143d17c46b6e4faf138db73c.zip tcl-e5c93914d5de3897143d17c46b6e4faf138db73c.tar.gz tcl-e5c93914d5de3897143d17c46b6e4faf138db73c.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.
Diffstat (limited to 'tests/get.test')
-rw-r--r-- | tests/get.test | 22 |
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} |