summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Jezabek <jezabek@poczta.onet.pl>2008-08-28 20:53:19 +0000
committerJan Jezabek <jezabek@poczta.onet.pl>2008-08-28 20:53:19 +0000
commit67d36558dbe2ff7da74d8ce3f14ecc43dd8dad76 (patch)
tree7cdb665b6a28dd6495f285bca2f3b6978d2a85b7
parent12bfa282fcf60b9fe07931b8ea83c6d21d69d970 (diff)
downloadswig-67d36558dbe2ff7da74d8ce3f14ecc43dd8dad76.tar.gz
Added throw_exception run test in VBScript.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-jezabek@10799 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Examples/test-suite/com/throw_exception_runme.vbs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Examples/test-suite/com/throw_exception_runme.vbs b/Examples/test-suite/com/throw_exception_runme.vbs
new file mode 100644
index 000000000..c8cda2135
--- /dev/null
+++ b/Examples/test-suite/com/throw_exception_runme.vbs
@@ -0,0 +1,19 @@
+Dim te, foo
+
+Set te = CreateObject("throw_exception.throw_exception")
+
+Set foo = te.Foo.new_Foo()
+
+Rem On Error Resume Next
+
+foo.test_int()
+
+If Err.Number = 0 Then
+ WScript.Echo "Exception should have been thrown"
+ WScript.Quit 1
+End If
+
+If Err.Description <> "C++ int exception thrown" Then
+ WScript.Echo "Incorrect exception message"
+ WScript.Quit 1
+End If