Add test case for using nspace without -package. TODO: Fix Makefile.in to actually not use -package when invoking swig.

This commit is contained in:
Brant K. Kyser 2013-01-12 00:48:49 -06:00 committed by William S Fulton
commit 988952af65
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,34 @@
%module java_nspacewithoutpackage
%pragma(java) jniclasspackage="PragmaDefinedPackage"
SWIG_JAVABODY_PROXY(public, public, SWIGTYPE)
SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
%include <std_string.i>
%nspace TopLevel::Foo;
%nspace TopLevel::Bar;
%{
#include <string>
%}
%inline %{
namespace TopLevel
{
class Foo {
public:
virtual ~Foo() {}
virtual std::string ping() { return "TopLevel::Foo::ping()"; }
};
class Bar {
public:
virtual ~Bar() {}
virtual std::string pong() { return "TopLevel::Bar::pong()"; }
};
}
%}