diff options
author | Jan Jezabek <jezabek@poczta.onet.pl> | 2008-08-28 20:53:19 +0000 |
---|---|---|
committer | Jan Jezabek <jezabek@poczta.onet.pl> | 2008-08-28 20:53:19 +0000 |
commit | 67d36558dbe2ff7da74d8ce3f14ecc43dd8dad76 (patch) | |
tree | 7cdb665b6a28dd6495f285bca2f3b6978d2a85b7 | |
parent | 12bfa282fcf60b9fe07931b8ea83c6d21d69d970 (diff) | |
download | swig-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.vbs | 19 |
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 |