PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/tcl/imports_runme.tcl

#
TCL | 22 lines | 18 code | 3 blank | 1 comment | 4 complexity | daf9ea0bbe3593717d30cb5defc06aa3 MD5 | raw file
 1
 2# This is the imports runtime testcase. 
 3proc import {} {
 4    if [ catch { load ./imports_b[info sharedlibextension] imports_b} err_msg ] {
 5            puts stderr "Could not load shared object:\n$err_msg"
 6            exit 1
 7    }
 8    if [ catch { load ./imports_a[info sharedlibextension] imports_a} err_msg ] {
 9            puts stderr "Could not load shared object:\n$err_msg"
10            exit 1
11    }
12}
13
14import
15
16set x [new_B]
17A_hello $x
18if [ catch { $x nonexistant } ] {
19} else {
20  puts stderr "nonexistant method did not throw exception\n"
21  exit 1
22}