diff options
author | Dave Beazley <dave-swig@dabeaz.com> | 2003-04-23 18:00:17 +0000 |
---|---|---|
committer | Dave Beazley <dave-swig@dabeaz.com> | 2003-04-23 18:00:17 +0000 |
commit | 7e615494b851ba6bda011c287df3548dbdd84e8d (patch) | |
tree | 3c82b3c2d8938ba9c5a9321ba6881a7b4cb0bfd1 /Examples/test-suite | |
parent | 2ab88fabbc16c958b91c4f90c225845540fda670 (diff) | |
download | swig-7e615494b851ba6bda011c287df3548dbdd84e8d.tar.gz |
new tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4701 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite')
-rw-r--r-- | Examples/test-suite/common.mk | 3 | ||||
-rw-r--r-- | Examples/test-suite/namespace_virtual_method.i | 38 | ||||
-rw-r--r-- | Examples/test-suite/python/namespace_virtual_method_runme.py | 3 |
3 files changed, 43 insertions, 1 deletions
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index 134c8ba64..fd6d835c9 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -42,7 +42,6 @@ DYNAMIC_LIB_PATH = $(RUNTIMEDIR):. # Broken C++ test cases. (Can be run individually using make testcase.cpptest.) CPP_TEST_BROKEN += \ - namespace_nested \ template_default_arg \ template_specialization_defarg \ template_specialization_enum \ @@ -134,8 +133,10 @@ CPP_TEST_CASES += \ name_inherit \ namespace_enum \ namespace_extend \ + namespace_nested \ namespace_template \ namespace_typemap \ + namespace_virtual_method \ newobject1 \ overload_complicated \ overload_copy \ diff --git a/Examples/test-suite/namespace_virtual_method.i b/Examples/test-suite/namespace_virtual_method.i new file mode 100644 index 000000000..2eac3c53b --- /dev/null +++ b/Examples/test-suite/namespace_virtual_method.i @@ -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 { }; + } +} +%} diff --git a/Examples/test-suite/python/namespace_virtual_method_runme.py b/Examples/test-suite/python/namespace_virtual_method_runme.py new file mode 100644 index 000000000..c3580fbc5 --- /dev/null +++ b/Examples/test-suite/python/namespace_virtual_method_runme.py @@ -0,0 +1,3 @@ +import namespace_virtual_method + +x = namespace_virtual_method.Spam() |