From d6268c8fdfdb192fa8485f8aaa7e9f99f14418a3 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 9 Nov 2004 21:23:04 +0000 Subject: [PATCH] %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 --- Examples/test-suite/features.i | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Examples/test-suite/features.i b/Examples/test-suite/features.i index b0ddb36c3..77dd4594f 100644 --- a/Examples/test-suite/features.i +++ b/Examples/test-suite/features.i @@ -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; } + }; +} +%} +