diff options
author | hobbs <hobbs> | 2001-11-14 23:16:35 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-11-14 23:16:35 (GMT) |
commit | 6b5ff76e865f488dd08efe0bd2a280b7ceda4543 (patch) | |
tree | 968eacc51e217eb1f7ff1c8b8693e3d2b0b2a39b /tests/obj.test | |
parent | c4f80ca2b57a0c80444e363fcb0aff8d3ff410dd (diff) | |
download | tcl-6b5ff76e865f488dd08efe0bd2a280b7ceda4543.zip tcl-6b5ff76e865f488dd08efe0bd2a280b7ceda4543.tar.gz tcl-6b5ff76e865f488dd08efe0bd2a280b7ceda4543.tar.bz2 |
added lset tests and updated lindex tests for TIPs#22,33,45 by Kenny
Diffstat (limited to 'tests/obj.test')
-rw-r--r-- | tests/obj.test | 73 |
1 files changed, 59 insertions, 14 deletions
diff --git a/tests/obj.test b/tests/obj.test index 3fffde8..8512049 100644 --- a/tests/obj.test +++ b/tests/obj.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: obj.test,v 1.5 2000/04/10 17:19:02 ericm Exp $ +# RCS: @(#) $Id: obj.test,v 1.6 2001/11/14 23:16:36 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -27,7 +27,20 @@ if {[info commands testobj] == {}} { test obj-1.1 {Tcl_AppendAllObjTypes, and InitTypeTable, Tcl_RegisterObjType} { set r 1 - foreach {t} {list boolean cmdName bytecode string int double} { + foreach {t} { + {array search} + boolean + bytearray + bytecode + double + end-offset + index + int + list + nsName + procbody + string + } { set first [string first $t [testobj types]] set r [expr {$r && ($first != -1)}] } @@ -528,20 +541,52 @@ test obj-30.1 {Ref counting and object deletion, simple types} { lappend result [testobj refcount 2] } {{} 1024 1024 int 4 4 0 boolean 3 2} + +test obj-31.1 {regenerate string rep of "end"} { + testobj freeallvars + teststringobj set 1 end + testobj convert 1 end-offset + testobj invalidateStringRep 1 +} end + +test obj-31.2 {regenerate string rep of "end-1"} { + testobj freeallvars + teststringobj set 1 end-0x1 + testobj convert 1 end-offset + testobj invalidateStringRep 1 +} end-1 + +test obj-31.3 {regenerate string rep of "end--1"} { + testobj freeallvars + teststringobj set 1 end--0x1 + testobj convert 1 end-offset + testobj invalidateStringRep 1 +} end--1 + +test obj-31.4 {regenerate string rep of "end-bigInteger"} { + testobj freeallvars + teststringobj set 1 end-0x7fffffff + testobj convert 1 end-offset + testobj invalidateStringRep 1 +} end-2147483647 + +test obj-31.5 {regenerate string rep of "end--bigInteger"} { + testobj freeallvars + teststringobj set 1 end--0x7fffffff + testobj convert 1 end-offset + testobj invalidateStringRep 1 +} end--2147483647 + + +test obj-31.6 {regenerate string rep of "end--bigInteger"} {nonPortable} { + testobj freeallvars + teststringobj set 1 end--0x80000000 + testobj convert 1 end-offset + testobj invalidateStringRep 1 +} end--2147483648 + testobj freeallvars # cleanup ::tcltest::cleanupTests return - - - - - - - - - - - - |