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

@ -1,9 +1,5 @@
%module nested_scope
#if !defined(SWIGCSHARP) && !defined(SWIGJAVA)
%feature ("flatnested");
#endif
%inline %{
namespace ns {
// "global" is a case-insensitive keyword in PHP.
@ -31,9 +27,9 @@ namespace ns {
public:
struct Nested2;
#ifdef __clang__
struct Nested2 {
int data;
};
struct Nested2 {
int data;
};
#endif
template <class T> class AbstractClass;
class Real;