Update ruby tests for change in swig_assert_equal_simple name
This commit is contained in:
parent
c9d094e034
commit
6398614c92
2 changed files with 34 additions and 34 deletions
|
|
@ -3,7 +3,7 @@ require "cpp11_shared_ptr_const"
|
|||
|
||||
include Cpp11_shared_ptr_const
|
||||
|
||||
simple_assert_equal(1, foo( Foo.new(1) ).get_m )
|
||||
simple_assert_equal(7, const_foo( Foo.new(7) ).get_m )
|
||||
simple_assert_equal(7, foo_vec( Foo.new(7) )[0].get_m )
|
||||
simple_assert_equal(8, const_foo_vec( Foo.new(8) )[0].get_m )
|
||||
swig_assert_equal_simple(1, foo( Foo.new(1) ).get_m )
|
||||
swig_assert_equal_simple(7, const_foo( Foo.new(7) ).get_m )
|
||||
swig_assert_equal_simple(7, foo_vec( Foo.new(7) )[0].get_m )
|
||||
swig_assert_equal_simple(8, const_foo_vec( Foo.new(8) )[0].get_m )
|
||||
|
|
|
|||
|
|
@ -5,56 +5,56 @@ require 'cpp11_shared_ptr_upcast'
|
|||
include Cpp11_shared_ptr_upcast
|
||||
|
||||
# non-overloaded
|
||||
simple_assert_equal( 7, derived_num1(Derived.new(7)) )
|
||||
simple_assert_equal( 7, derived_num2([Derived.new(7)]) )
|
||||
simple_assert_equal( 7, derived_num3({0 => Derived.new(7)}) )
|
||||
swig_assert_equal_simple( 7, derived_num1(Derived.new(7)) )
|
||||
swig_assert_equal_simple( 7, derived_num2([Derived.new(7)]) )
|
||||
swig_assert_equal_simple( 7, derived_num3({0 => Derived.new(7)}) )
|
||||
|
||||
simple_assert_equal(-1, base_num1(Derived.new(7)) )
|
||||
simple_assert_equal(-1, base_num2([Derived.new(7)]) )
|
||||
simple_assert_equal(-1, base_num3({0 => Derived.new(7)}) )
|
||||
swig_assert_equal_simple(-1, base_num1(Derived.new(7)) )
|
||||
swig_assert_equal_simple(-1, base_num2([Derived.new(7)]) )
|
||||
swig_assert_equal_simple(-1, base_num3({0 => Derived.new(7)}) )
|
||||
|
||||
simple_assert_equal( 999, derived_num1(nil) )
|
||||
simple_assert_equal( 999, derived_num2([nil]) )
|
||||
simple_assert_equal( 999, derived_num3({0 => nil}) )
|
||||
swig_assert_equal_simple( 999, derived_num1(nil) )
|
||||
swig_assert_equal_simple( 999, derived_num2([nil]) )
|
||||
swig_assert_equal_simple( 999, derived_num3({0 => nil}) )
|
||||
|
||||
simple_assert_equal( 999, base_num1(nil) )
|
||||
simple_assert_equal( 999, base_num2([nil]) )
|
||||
simple_assert_equal( 999, base_num3({0 => nil}) )
|
||||
swig_assert_equal_simple( 999, base_num1(nil) )
|
||||
swig_assert_equal_simple( 999, base_num2([nil]) )
|
||||
swig_assert_equal_simple( 999, base_num3({0 => nil}) )
|
||||
|
||||
# overloaded
|
||||
simple_assert_equal( 7, derived_num(Derived.new(7)) )
|
||||
simple_assert_equal( 7, derived_num([Derived.new(7)]) )
|
||||
simple_assert_equal( 7, derived_num({0 => Derived.new(7)}) )
|
||||
swig_assert_equal_simple( 7, derived_num(Derived.new(7)) )
|
||||
swig_assert_equal_simple( 7, derived_num([Derived.new(7)]) )
|
||||
swig_assert_equal_simple( 7, derived_num({0 => Derived.new(7)}) )
|
||||
|
||||
simple_assert_equal(-1, base_num(Derived.new(7)) )
|
||||
simple_assert_equal(-1, base_num([Derived.new(7)]) )
|
||||
simple_assert_equal(-1, base_num({0 => Derived.new(7)}) )
|
||||
swig_assert_equal_simple(-1, base_num(Derived.new(7)) )
|
||||
swig_assert_equal_simple(-1, base_num([Derived.new(7)]) )
|
||||
swig_assert_equal_simple(-1, base_num({0 => Derived.new(7)}) )
|
||||
|
||||
# ptr to shared_ptr
|
||||
simple_assert_equal( 7, derived2_num1(Derived2.new(7)) )
|
||||
simple_assert_equal( 7, derived2_num2([Derived2.new(7)]) )
|
||||
simple_assert_equal( 7, derived2_num3({0 => Derived2.new(7)}) )
|
||||
swig_assert_equal_simple( 7, derived2_num1(Derived2.new(7)) )
|
||||
swig_assert_equal_simple( 7, derived2_num2([Derived2.new(7)]) )
|
||||
swig_assert_equal_simple( 7, derived2_num3({0 => Derived2.new(7)}) )
|
||||
|
||||
simple_assert_equal( -1, base2_num1(Derived2.new(7)) )
|
||||
swig_assert_equal_simple( -1, base2_num1(Derived2.new(7)) )
|
||||
|
||||
begin
|
||||
# Upcast for pointers to shared_ptr in this generic framework has not been implemented
|
||||
simple_assert_equal( -1, base2_num2([Derived2.new(7)]) )
|
||||
swig_assert_equal_simple( -1, base2_num2([Derived2.new(7)]) )
|
||||
raise RuntimeError, "Failed to catch TypeError"
|
||||
rescue TypeError
|
||||
end
|
||||
begin
|
||||
# Upcast for pointers to shared_ptr in this generic framework has not been implemented
|
||||
simple_assert_equal( -1, base2_num3({0 => Derived2.new(7)}) )
|
||||
swig_assert_equal_simple( -1, base2_num3({0 => Derived2.new(7)}) )
|
||||
raise RuntimeError, "Failed to catch TypeError"
|
||||
rescue TypeError
|
||||
end
|
||||
|
||||
simple_assert_equal( 888, derived2_num1(nil) )
|
||||
simple_assert_equal( 999, derived2_num2([nil]) ) # although 888 would be more consistent
|
||||
simple_assert_equal( 999, derived2_num3({0 => nil}) ) # although 888 would be more consistent
|
||||
swig_assert_equal_simple( 888, derived2_num1(nil) )
|
||||
swig_assert_equal_simple( 999, derived2_num2([nil]) ) # although 888 would be more consistent
|
||||
swig_assert_equal_simple( 999, derived2_num3({0 => nil}) ) # although 888 would be more consistent
|
||||
|
||||
simple_assert_equal( 888, base2_num1(nil) )
|
||||
simple_assert_equal( 999, base2_num2([nil]) ) # although 888 would be more consistent
|
||||
simple_assert_equal( 999, base2_num3({0 => nil}) ) # although 888 would be more consistent
|
||||
swig_assert_equal_simple( 888, base2_num1(nil) )
|
||||
swig_assert_equal_simple( 999, base2_num2([nil]) ) # although 888 would be more consistent
|
||||
swig_assert_equal_simple( 999, base2_num3({0 => nil}) ) # although 888 would be more consistent
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue