git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7879 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-11-27 02:15:26 +00:00
commit e7bd6be39e
2 changed files with 26 additions and 2 deletions

View file

@ -9,7 +9,8 @@ try:
a = Test_int.LeftIndex
a = Test_int.cavity_flags
except:
print "Failed!!"
raise RuntimeError
if Foo.BAZ.val != 2*Foo.BAR.val:
raise RuntimeError

View file

@ -51,3 +51,26 @@ const int &oss::modules::CavityPackFlags::reftest = refvalue;
%template(Test_int) oss::modules::Test<int>;
%inline %{
class Foo
{
public:
int val;
Foo(int v) : val(v)
{
}
static const Foo BAR;
static const Foo BAZ;
};
%}
%{
const Foo Foo::BAR = Foo(1);
const Foo Foo::BAZ = Foo(2);
%}