%feature tests added for methods in an inheritance chain

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6702 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-11-09 21:23:04 +00:00
commit d6268c8fdf

View file

@ -130,3 +130,23 @@ namespace Space {
}
%}
// Test 7: inheritance
%exception Space::Base::Base() "$action /* Space::Base::Base() */";
%exception Space::Base::~Base() "$action /* Space::Base::~Base() */";
%exception Space::Derived::Derived() "$action /* Space::Derived::Derived() */";
%exception Space::Derived::~Derived() "$action /* Space::Derived::~Derived() */";
// The following should apply to both Base and Derived
%exception Space::Base::virtualmethod(int a) const "$action /* Space::Base::virtualmethod(int a) const */";
%inline %{
namespace Space {
struct Base {
virtual const char** virtualmethod(int a) const { return 0; }
virtual ~Base() {}
};
struct Derived : Base {
virtual const char** virtualmethod(int a) const { return 0; }
};
}
%}