new tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4701 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e883360f9b
commit
ebaf865b54
3 changed files with 43 additions and 1 deletions
|
|
@ -42,7 +42,6 @@ DYNAMIC_LIB_PATH = $(RUNTIMEDIR):.
|
||||||
|
|
||||||
# Broken C++ test cases. (Can be run individually using make testcase.cpptest.)
|
# Broken C++ test cases. (Can be run individually using make testcase.cpptest.)
|
||||||
CPP_TEST_BROKEN += \
|
CPP_TEST_BROKEN += \
|
||||||
namespace_nested \
|
|
||||||
template_default_arg \
|
template_default_arg \
|
||||||
template_specialization_defarg \
|
template_specialization_defarg \
|
||||||
template_specialization_enum \
|
template_specialization_enum \
|
||||||
|
|
@ -134,8 +133,10 @@ CPP_TEST_CASES += \
|
||||||
name_inherit \
|
name_inherit \
|
||||||
namespace_enum \
|
namespace_enum \
|
||||||
namespace_extend \
|
namespace_extend \
|
||||||
|
namespace_nested \
|
||||||
namespace_template \
|
namespace_template \
|
||||||
namespace_typemap \
|
namespace_typemap \
|
||||||
|
namespace_virtual_method \
|
||||||
newobject1 \
|
newobject1 \
|
||||||
overload_complicated \
|
overload_complicated \
|
||||||
overload_copy \
|
overload_copy \
|
||||||
|
|
|
||||||
38
SWIG/Examples/test-suite/namespace_virtual_method.i
Normal file
38
SWIG/Examples/test-suite/namespace_virtual_method.i
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
%module namespace_virtual_method
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
|
||||||
|
namespace A {
|
||||||
|
namespace B {
|
||||||
|
class Foo;
|
||||||
|
}
|
||||||
|
namespace C {
|
||||||
|
class Foo {
|
||||||
|
public:
|
||||||
|
Foo() { };
|
||||||
|
virtual ~Foo() { };
|
||||||
|
virtual int bar(const A::B::Foo &x) = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace A {
|
||||||
|
namespace C {
|
||||||
|
class Spam : public Foo {
|
||||||
|
public:
|
||||||
|
Spam() { }
|
||||||
|
virtual ~Spam() { }
|
||||||
|
virtual int bar(const B::Foo &x) { return 1; }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
%{
|
||||||
|
namespace A {
|
||||||
|
namespace B {
|
||||||
|
class Foo { };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import namespace_virtual_method
|
||||||
|
|
||||||
|
x = namespace_virtual_method.Spam()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue