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