Ruby shared_ptr fixes for use with minherit

This commit is contained in:
William S Fulton 2015-10-01 20:27:29 +01:00
commit e12277a469
4 changed files with 76 additions and 10 deletions

View file

@ -22,6 +22,7 @@ CPP_TEST_CASES = \
li_std_stack \
primitive_types \
ruby_keywords \
ruby_minherit_shared_ptr \
ruby_naming \
ruby_track_objects \
ruby_track_objects_directors \

View file

@ -0,0 +1,28 @@
#!/usr/bin/env ruby
#
# Put description here
#
#
#
#
#
require 'ruby_minherit_shared_ptr'
md = Ruby_minherit_shared_ptr::MultiDerived.new(11, 22)
if md.Base1Func != 11 then
raise RuntimeError
end
if md.Interface1Func != 22 then
raise RuntimeError
end
if Ruby_minherit_shared_ptr.BaseCheck(md) != 11 then
raise RuntimeError
end
if Ruby_minherit_shared_ptr.InterfaceCheck(md) != 22 then
raise RuntimeError
end
if Ruby_minherit_shared_ptr.DerivedCheck(md) != 33 then
raise RuntimeError
end