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.
This commit is contained in:
Thomas Reitmayr 2020-12-12 22:09:56 +01:00
commit 7963445048
38 changed files with 1109 additions and 37 deletions

View file

@ -0,0 +1,24 @@
#!/usr/bin/env ruby
#
# This test implementation is directly derived from its Java counterpart.
#
require 'cpp17_nested_namespaces'
Cpp17_nested_namespaces::A1Struct.new.A1Method
Cpp17_nested_namespaces::B1Struct.new.B1Method
Cpp17_nested_namespaces::C1Struct.new.C1Method
Cpp17_nested_namespaces.createA1Struct().A1Method
Cpp17_nested_namespaces.createB1Struct().B1Method
Cpp17_nested_namespaces.createC1Struct().C1Method
Cpp17_nested_namespaces::B2Struct.new.B2Method
Cpp17_nested_namespaces::C2Struct.new.C2Method
Cpp17_nested_namespaces.createB2Struct().B2Method
Cpp17_nested_namespaces.createC2Struct().C2Method
Cpp17_nested_namespaces::B3Struct.new.B3Method
Cpp17_nested_namespaces::C3Struct.new.C3Method
Cpp17_nested_namespaces.createB3Struct().B3Method
Cpp17_nested_namespaces.createC3Struct().C3Method