swig/Examples/test-suite/ruby/nested_directors_runme.rb
Thomas Reitmayr 7963445048 Add and improve Ruby test cases in the context of nesting and namespaces
This is done in preparation for adding namespace support to the Ruby
part of SWIG. Some existing test cases were reorganized or duplicated
for flat/nonflat nesting. For some a Ruby test script was added.
Finally the ruby/Makefile.in was improved so that for test cases
without an explicit test script, the generated wrapper library will
be loaded by the Ruby interpreter to ensure loading works fine.
2020-12-16 22:30:46 +01:00

29 lines
472 B
Ruby

#!/usr/bin/env ruby
#
# This test implementation is directly derived from its C# counterpart.
#
require 'swig_assert'
require 'nested_directors'
# nested classes not yet supported
#class CNested < Nested_directors::Base::Nest
# def GetValue
# true
# end
#end
class CSub < Nested_directors::Sub
def GetValue
super
end
def Test
GetValue()
end
end
#n = CNested.new
#swig_assert('n.GetValue()', binding)
s = CSub.new
swig_assert('s.Test()', binding)