From 878f80fc0c07d1cfee750ccac3034b5a00c12630 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 18 Aug 2005 20:38:23 +0000 Subject: %newobject tests from Bob Marinier git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7378 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/tcl/newobject1_runme.tcl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Examples/test-suite/tcl/newobject1_runme.tcl (limited to 'Examples/test-suite/tcl/newobject1_runme.tcl') 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 +} -- cgit v1.2.1