diff --git a/Examples/test-suite/python/static_const_member_2_runme.py b/Examples/test-suite/python/static_const_member_2_runme.py index 738daf465..081726361 100644 --- a/Examples/test-suite/python/static_const_member_2_runme.py +++ b/Examples/test-suite/python/static_const_member_2_runme.py @@ -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 diff --git a/Examples/test-suite/static_const_member_2.i b/Examples/test-suite/static_const_member_2.i index 3bd08b820..39d005ae0 100644 --- a/Examples/test-suite/static_const_member_2.i +++ b/Examples/test-suite/static_const_member_2.i @@ -51,3 +51,26 @@ const int &oss::modules::CavityPackFlags::reftest = refvalue; %template(Test_int) oss::modules::Test; + + + +%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); +%}