summaryrefslogtreecommitdiffstats
path: root/tests/indexObj.test
diff options
context:
space:
mode:
authorgriffin <briang42@easystreet.net>2023-08-14 05:07:19 (GMT)
committergriffin <briang42@easystreet.net>2023-08-14 05:07:19 (GMT)
commit08461f8e8fa49a0334e95b6d299b82ba42d38fc6 (patch)
tree57fbc36c6a45d6cdcb17ff21221c5f60fb130a07 /tests/indexObj.test
parent558680d5e533199087901b2f9f29c9a1ea0ffdde (diff)
parented918cb027572a80468457db906cbb132f29b920 (diff)
downloadtcl-08461f8e8fa49a0334e95b6d299b82ba42d38fc6.zip
tcl-08461f8e8fa49a0334e95b6d299b82ba42d38fc6.tar.gz
tcl-08461f8e8fa49a0334e95b6d299b82ba42d38fc6.tar.bz2
merge trunk
Diffstat (limited to 'tests/indexObj.test')
-rw-r--r--tests/indexObj.test22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test
index f8cdf3e..f157637 100644
--- a/tests/indexObj.test
+++ b/tests/indexObj.test
@@ -20,6 +20,7 @@ testConstraint testindexobj [llength [info commands testindexobj]]
testConstraint testgetintforindex [llength [info commands testgetintforindex]]
testConstraint testparseargs [llength [info commands testparseargs]]
testConstraint has64BitLengths [expr {$tcl_platform(pointerSize) == 8}]
+testConstraint has32BitLengths [expr {$tcl_platform(pointerSize) == 4}]
test indexObj-1.1 {exact match} testindexobj {
testindexobj 1 1 xyz abc def xyz alm
@@ -203,25 +204,26 @@ test indexObj-8.10 {Tcl_GetIntForIndex end-1} testgetintforindex {
} -2
test indexObj-8.11 {Tcl_GetIntForIndex end-1} testgetintforindex {
testgetintforindex end-1 -2
-} [expr {[testConstraint has64BitLengths] ? -3 : 2147483647}]
+} -3
test indexObj-8.12 {Tcl_GetIntForIndex end} testgetintforindex {
testgetintforindex end -1
} -1
test indexObj-8.13 {Tcl_GetIntForIndex end} testgetintforindex {
testgetintforindex end -2
-} [expr {[testConstraint has64BitLengths] ? -2 : 2147483647}]
-test indexObj-8.14 {Tcl_GetIntForIndex end+1} testgetintforindex {
+} -2
+test indexObj-8.14 {Tcl_GetIntForIndex end+1} -constraints {
+ testgetintforindex has64BitLengths
+} -body {
+ testgetintforindex end+1 -1
+} -result 9223372036854775807
+test indexObj-8.14.32bits {Tcl_GetIntForIndex end+1} -constraints {
+ testgetintforindex has32BitLengths
+} -body {
testgetintforindex end+1 -1
-} [expr {[testConstraint has64BitLengths] ? 9223372036854775807 : 2147483647}]
+} -result 2147483647
test indexObj-8.15 {Tcl_GetIntForIndex end+1} testgetintforindex {
testgetintforindex end+1 -2
} -1
-test indexObj-8.16 {Tcl_GetIntForIndex integer} testgetintforindex {
- testgetintforindex -1 -1
-} [expr {[testConstraint has64BitLengths] ? -9223372036854775808 : -2147483648}]
-test indexObj-8.17 {Tcl_GetIntForIndex integer} testgetintforindex {
- testgetintforindex -2 -1
-} [expr {[testConstraint has64BitLengths] ? -9223372036854775808 : -2147483648}]
# cleanup
::tcltest::cleanupTests