interface feature test changes for the tests to pass for all languages
This commit is contained in:
parent
5cf20086a4
commit
5d58de60d6
7 changed files with 49 additions and 24 deletions
|
|
@ -1,6 +1,10 @@
|
|||
// This is a copy of the multiple_inheritance_abstract test
|
||||
%module multiple_inheritance_abstract
|
||||
|
||||
%warnfilter(SWIGWARN_RUBY_MULTIPLE_INHERITANCE,
|
||||
SWIGWARN_D_MULTIPLE_INHERITANCE,
|
||||
SWIGWARN_PHP_MULTIPLE_INHERITANCE); /* languages not supporting multiple inheritance or %interface */
|
||||
|
||||
#if defined(SWIGJAVA) || defined(SWIGCSHARP)
|
||||
%include "swiginterface.i"
|
||||
%interface_impl(Space::ABase1)
|
||||
|
|
@ -8,6 +12,12 @@
|
|||
%interface_impl(Space::CBase2)
|
||||
#endif
|
||||
|
||||
#if defined(SWIGD)
|
||||
// Missing multiple inheritance support results in incorrect use of override
|
||||
%ignore CBase1;
|
||||
%ignore CBase2;
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
namespace Space {
|
||||
struct CBase1 {
|
||||
|
|
@ -48,7 +58,7 @@ namespace Space {
|
|||
virtual int cbase2() {
|
||||
return 4;
|
||||
}
|
||||
virtual CBase2 *clone() {
|
||||
virtual CBase2 *cloneit() {
|
||||
return new Derived1(*this);
|
||||
}
|
||||
void derived1() {
|
||||
|
|
@ -65,7 +75,7 @@ namespace Space {
|
|||
virtual int abase1() {
|
||||
return 5;
|
||||
}
|
||||
virtual CBase1 *clone() {
|
||||
virtual CBase1 *cloneit() {
|
||||
return new Derived2(*this);
|
||||
}
|
||||
void derived2() {
|
||||
|
|
@ -84,7 +94,7 @@ namespace Space {
|
|||
}
|
||||
virtual void cbase1x() {
|
||||
}
|
||||
virtual ABase1 *clone() {
|
||||
virtual ABase1 *cloneit() {
|
||||
return new Derived3(*this);
|
||||
}
|
||||
void derived3() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue