git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4474 626c5289-ae23-0410-ae9c-e8d60b6d4f22
32 lines
602 B
Ruby
32 lines
602 B
Ruby
require 'abstract_signature'
|
|
|
|
include Abstract_signature
|
|
|
|
#
|
|
# Shouldn't be able to instantiate Abstract_foo, because it declares
|
|
# a pure virtual function.
|
|
#
|
|
|
|
exceptionRaised = false
|
|
begin
|
|
Abstract_foo.new
|
|
rescue NameError
|
|
exceptionRaised = true
|
|
ensure
|
|
raise RuntimeError unless exceptionRaised
|
|
end
|
|
|
|
#
|
|
# Shouldn't be able to instantiate an Abstract_bar either, because it doesn't
|
|
# implement the pure virtual function with the correct signature.
|
|
#
|
|
|
|
exceptionRaised = false
|
|
begin
|
|
Abstract_bar.new
|
|
rescue NameError
|
|
exceptionRaised = true
|
|
ensure
|
|
raise RuntimeError unless exceptionRaised
|
|
end
|
|
|