summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/link.test40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/link.test b/tests/link.test
index 765f4b9..28ab6aa 100644
--- a/tests/link.test
+++ b/tests/link.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: link.test,v 1.7 2002/06/22 04:19:47 dgp Exp $
+# RCS: @(#) $Id: link.test,v 1.8 2005/09/08 13:42:45 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -27,12 +27,12 @@ foreach i {int real bool string} {
test link-1.1 {reading C variables from Tcl} {testlink} {
testlink delete
testlink set 43 1.23 4 - 12341234
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list $int $real $bool $string $wide
} {43 1.23 1 NULL 12341234}
test link-1.2 {reading C variables from Tcl} {testlink} {
testlink delete
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -3 2 0 "A long string with spaces" 43214321
list $int $real $bool $string $wide $int $real $bool $string $wide
} {-3 2.0 0 {A long string with spaces} 43214321 -3 2.0 0 {A long string with spaces} 43214321}
@@ -40,7 +40,7 @@ test link-1.2 {reading C variables from Tcl} {testlink} {
test link-2.1 {writing C variables from Tcl} {testlink} {
testlink delete
testlink set 43 1.21 4 - 56785678
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
set int "00721"
set real -10.5
set bool true
@@ -51,25 +51,25 @@ test link-2.1 {writing C variables from Tcl} {testlink} {
test link-2.2 {writing bad values into variables} {testlink} {
testlink delete
testlink set 43 1.23 4 - 56785678
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set int 09a} msg] $msg $int
} {1 {can't set "int": variable must have integer value} 43}
test link-2.3 {writing bad values into variables} {testlink} {
testlink delete
testlink set 43 1.23 4 - 56785678
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set real 1.x3} msg] $msg $real
} {1 {can't set "real": variable must have real value} 1.23}
test link-2.4 {writing bad values into variables} {testlink} {
testlink delete
testlink set 43 1.23 4 - 56785678
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set bool gorp} msg] $msg $bool
} {1 {can't set "bool": variable must have boolean value} 1}
test link-2.5 {writing bad values into variables} {testlink} {
testlink delete
testlink set 43 1.23 4 - 56785678
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
list [catch {set wide gorp} msg] $msg $bool
} {1 {can't set "wide": variable must have integer value} 1}
@@ -97,7 +97,7 @@ test link-3.2 {read-only variables} {testlink} {
test link-4.1 {unsetting linked variables} {testlink} {
testlink delete
testlink set -6 -2.5 0 stringValue 13579
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
unset int real bool string wide
list [catch {set int} msg] $msg [catch {set real} msg] $msg \
[catch {set bool} msg] $msg [catch {set string} msg] $msg \
@@ -106,7 +106,7 @@ test link-4.1 {unsetting linked variables} {testlink} {
test link-4.2 {unsetting linked variables} {testlink} {
testlink delete
testlink set -6 -2.1 0 stringValue 97531
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
unset int real bool string wide
set int 102
set real 16
@@ -130,7 +130,7 @@ test link-5.1 {unlinking variables} {testlink} {
test link-5.2 {unlinking variables} {testlink} {
testlink delete
testlink set -6 -2.25 0 stringValue 97531
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink delete
testlink set 25 14.7 7 - 999999
list $int $real $bool $string $wide
@@ -140,7 +140,7 @@ test link-6.1 {errors in setting up link} {testlink} {
testlink delete
catch {unset int}
set int(44) 1
- list [catch {testlink create 1 1 1 1 1} msg] $msg
+ list [catch {testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1} msg] $msg
} {1 {can't set "int": variable is array}}
catch {unset int}
@@ -161,7 +161,7 @@ test link-7.2 {access to linked variables via upvar} {testlink} {
return [set y]
}
testlink delete
- testlink create 1 0 0 0 0
+ testlink create 1 0 0 0 0 0 0 0 0 0 0 0 0 0
testlink set 0 {} {} {} {}
set int
testlink set 23 {} {} {} {}
@@ -174,7 +174,7 @@ test link-7.3 {access to linked variables via upvar} {testlink} {
set y 44
}
testlink delete
- testlink create 0 0 0 0 0
+ testlink create 0 0 0 0 0 0 0 0 0 0 0 0 0 0
testlink set 11 {} {} {} {}
list [catch x msg] $msg $int
} {1 {can't set "y": linked variable is read-only} 11}
@@ -184,7 +184,7 @@ test link-7.4 {access to linked variables via upvar} {testlink} {
set y abc
}
testlink delete
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 {} {} {} {}
list [catch x msg] $msg $int
} {1 {can't set "y": variable must have integer value} -4}
@@ -194,7 +194,7 @@ test link-7.5 {access to linked variables via upvar} {testlink} {
set y abc
}
testlink delete
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 16.75 {} {} {}
list [catch x msg] $msg $real
} {1 {can't set "y": variable must have real value} 16.75}
@@ -204,7 +204,7 @@ test link-7.6 {access to linked variables via upvar} {testlink} {
set y abc
}
testlink delete
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 16.3 1 {} {}
list [catch x msg] $msg $bool
} {1 {can't set "y": variable must have boolean value} 1}
@@ -214,7 +214,7 @@ test link-7.7 {access to linked variables via upvar} {testlink} {
set y abc
}
testlink delete
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set -4 16.3 1 {} 778899
list [catch x msg] $msg $wide
} {1 {can't set "y": variable must have integer value} 778899}
@@ -225,7 +225,7 @@ test link-8.1 {Tcl_UpdateLinkedVar procedure} {testlink} {
lappend x $args $int $real $bool $string $wide
}
set x {}
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set 14 -2.0 0 xyzzy 995511
trace var int w x
testlink update 32 4.0 3 abcd 113355
@@ -238,7 +238,7 @@ test link-8.2 {Tcl_UpdateLinkedVar procedure} {testlink} {
lappend x $args $int $real $bool $string $wide
}
set x {}
- testlink create 1 1 1 1 1
+ testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1
testlink set 14 -2.0 0 xyzzy 995511
testlink delete
trace var int w x