PageRenderTime 74ms CodeModel.GetById 66ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
TCL | 28 lines | 13 code | 3 blank | 12 comment | 5 complexity | 53266bc0e0e240d4b435acdbf7a1d72b MD5 | raw file
 1if [ catch { load ./newobject1[info sharedlibextension] newobject1} err_msg ] {
 2	puts stderr "Could not load shared object:\n$err_msg"
 3}
 4
 5set foo1 [Foo_makeFoo]
 6if {[Foo_fooCount] != 1} {
 7    puts stderr "newobject1 test 1 failed"
 8    exit 1
 9}
10
11set foo2 [$foo1 makeMore]
12if {[Foo_fooCount] != 2} {
13    puts stderr "newobject1 test 2 failed"
14    exit 1
15}
16
17# Disable test while we solve the problem of premature object deletion
18#$foo1 -delete
19#if {[Foo_fooCount] != 1} {
20#    puts stderr "newobject1 test 3 failed"
21#    exit 1
22#}
23#
24#$foo2 -delete
25#if {[Foo_fooCount] != 0} {
26#    puts stderr "newobject1 test 4 failed"
27#    exit 1
28#}