Updated some tests to use swig_assert.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5be075f16f
commit
bbee2e374c
6 changed files with 13 additions and 15 deletions
|
|
@ -28,7 +28,7 @@ rescue TypeError
|
||||||
# TypeError: allocator undefined for Abstract_inherit_ok::Foo
|
# TypeError: allocator undefined for Abstract_inherit_ok::Foo
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError unless exceptionRaised
|
swig_assert( exceptionRaised, "for !exceptionRaised" )
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -43,6 +43,6 @@ begin
|
||||||
rescue NameError
|
rescue NameError
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError if exceptionRaised
|
swig_assert( !exceptionRaised, "for exceptionRaised" )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ rescue TypeError
|
||||||
# TypeError: allocator undefined for Abstract_inherit::Foo
|
# TypeError: allocator undefined for Abstract_inherit::Foo
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError unless exceptionRaised
|
swig_assert( exceptionRaised, "exceptionRaised")
|
||||||
end
|
end
|
||||||
|
|
||||||
exceptionRaised = false
|
exceptionRaised = false
|
||||||
|
|
@ -42,7 +42,7 @@ rescue TypeError
|
||||||
# TypeError: allocator undefined for Abstract_inherit::Bar
|
# TypeError: allocator undefined for Abstract_inherit::Bar
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError unless exceptionRaised
|
swig_assert( exceptionRaised, "exceptionRaised")
|
||||||
end
|
end
|
||||||
|
|
||||||
exceptionRaised = false
|
exceptionRaised = false
|
||||||
|
|
@ -55,6 +55,7 @@ rescue TypeError
|
||||||
# TypeError: allocator undefined for Abstract_inherit::Spam
|
# TypeError: allocator undefined for Abstract_inherit::Spam
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError unless exceptionRaised
|
swig_assert( exceptionRaised, "exceptionRaised")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'swig_assert'
|
require 'swig_assert'
|
||||||
|
|
||||||
require 'abstract_signature'
|
require 'abstract_signature'
|
||||||
|
|
||||||
include Abstract_signature
|
include Abstract_signature
|
||||||
|
|
@ -34,7 +33,7 @@ rescue TypeError
|
||||||
# TypeError: allocator undefined for Abstract_signature::Abstract_foo
|
# TypeError: allocator undefined for Abstract_signature::Abstract_foo
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError unless exceptionRaised
|
swig_assert( exceptionRaised, "for exceptionRaised")
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -58,6 +57,6 @@ rescue TypeError
|
||||||
# TypeError: allocator undefined for Abstract_signature::Abstract_bar
|
# TypeError: allocator undefined for Abstract_signature::Abstract_bar
|
||||||
exceptionRaised = true
|
exceptionRaised = true
|
||||||
ensure
|
ensure
|
||||||
raise RuntimeError unless exceptionRaised
|
swig_assert( exceptionRaised, "for exceptionRaised")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'swig_assert'
|
require 'swig_assert'
|
||||||
|
|
||||||
require 'abstract_typedef2'
|
require 'abstract_typedef2'
|
||||||
|
|
||||||
include Abstract_typedef2
|
include Abstract_typedef2
|
||||||
|
|
||||||
a = A_UF.new
|
swig_assert( 'a = A_UF.new' )
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@ include Abstract_typedef
|
||||||
e = Engine.new
|
e = Engine.new
|
||||||
a = A.new
|
a = A.new
|
||||||
|
|
||||||
raise RuntimeError if a.write(e) != true
|
swig_assert( a.write(e), 'for a.write(e)' )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,9 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'swig_assert'
|
require 'swig_assert'
|
||||||
|
|
||||||
require 'abstract_virtual'
|
require 'abstract_virtual'
|
||||||
|
|
||||||
include Abstract_virtual
|
include Abstract_virtual
|
||||||
|
|
||||||
d = D.new
|
swig_assert('d = D.new')
|
||||||
e = E.new
|
swig_assert('e = E.new')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue