diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2005-08-18 20:38:23 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2005-08-18 20:38:23 +0000 |
commit | 878f80fc0c07d1cfee750ccac3034b5a00c12630 (patch) | |
tree | 4090d42099e672424b0f25cc096095d8940692d5 /Examples/test-suite/tcl/newobject1_runme.tcl | |
parent | b366ef3d48c1e7896b0e7aa72d3af69a15cc7e2c (diff) | |
download | swig-878f80fc0c07d1cfee750ccac3034b5a00c12630.tar.gz |
%newobject tests from Bob Marinier
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7378 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/tcl/newobject1_runme.tcl')
-rw-r--r-- | Examples/test-suite/tcl/newobject1_runme.tcl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Examples/test-suite/tcl/newobject1_runme.tcl b/Examples/test-suite/tcl/newobject1_runme.tcl new file mode 100644 index 000000000..e8806b4f8 --- /dev/null +++ b/Examples/test-suite/tcl/newobject1_runme.tcl @@ -0,0 +1,27 @@ +if [ catch { load ./newobject1[info sharedlibextension] newobject1} err_msg ] { + puts stderr "Could not load shared object:\n$err_msg" +} + +set foo1 [Foo_makeFoo] +if {[Foo_fooCount] != 1} { + puts stderr "newobject1 test 1 failed" + exit 1 +} + +set foo2 [$foo1 makeMore] +if {[Foo_fooCount] != 2} { + puts stderr "newobject1 test 2 failed" + exit 1 +} + +$foo1 -delete +if {[Foo_fooCount] != 1} { + puts stderr "newobject1 test 3 failed" + exit 1 +} + +$foo2 -delete +if {[Foo_fooCount] != 0} { + puts stderr "newobject1 test 4 failed" + exit 1 +} |