ten::handle class
[scpubgit/TenDotTcl.git] / t / connection.t
index ab4397b..7c28bc7 100644 (file)
@@ -39,16 +39,14 @@ set ortestdata [[$conn send call {*}[jws class_call_handler 0 call ORTestClass n
 
 set ortestoid [lindex $ortestdata 0 1]
 
-proc ortest {args} {
-  return [[$::conn send call {*}[jws $::ortestoid 0 {*}$args]] await_get]
-}
+ten::handle ortest -id $ortestoid -connection $conn
 
-cmp_ok != [pid] [ortest pid] "pid is different on the other side"
+cmp_ok != [pid] [ortest call pid] "pid is different on the other side"
 
-is [ortest counter] 0 "Counter at 0"
+is [ortest call counter] 0 "Counter at 0"
 
-is [ortest increment] 1 "Incrememt to 1"
+is [ortest call increment] 1 "Incrememt to 1"
 
-is [ortest counter] 1 "Counter at 1"
+is [ortest call counter] 1 "Counter at 1"
 
 done_testing