*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6100 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1feef7530b
commit
b4a7b09ea9
1 changed files with 30 additions and 0 deletions
30
Examples/test-suite/ruby/throw_exception_runme.rb
Normal file
30
Examples/test-suite/ruby/throw_exception_runme.rb
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
require 'throw_exception'
|
||||||
|
|
||||||
|
include Throw_exception
|
||||||
|
|
||||||
|
foo = Foo.new
|
||||||
|
|
||||||
|
begin
|
||||||
|
foo.test_int
|
||||||
|
rescue => ex
|
||||||
|
raise RuntimeError if ex.message != "37"
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
foo.test_msg
|
||||||
|
rescue => ex
|
||||||
|
raise RuntimeError if ex.message != "Dead"
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
foo.test_multi(1)
|
||||||
|
rescue => ex
|
||||||
|
raise RuntimeError if ex.message != "37"
|
||||||
|
end
|
||||||
|
|
||||||
|
begin
|
||||||
|
foo.test_multi(2)
|
||||||
|
rescue => ex
|
||||||
|
raise RuntimeError if ex.message != "Dead"
|
||||||
|
end
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue