PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Examples/test-suite/tcl/newobject1_runme.tcl

#
TCL | 27 lines | 23 code | 4 blank | 0 comment | 9 complexity | 285c4230f29d6eaf72fcddc0d21c78e2 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 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$foo1 -delete
18if {[Foo_fooCount] != 1} {
19    puts stderr "newobject1 test 3 failed"
20    exit 1
21}
22
23$foo2 -delete
24if {[Foo_fooCount] != 0} {
25    puts stderr "newobject1 test 4 failed"
26    exit 1
27}