diff --git a/SWIG/Examples/test-suite/class_scope_weird.i b/SWIG/Examples/test-suite/class_scope_weird.i index 921d2cd53..74155478c 100644 --- a/SWIG/Examples/test-suite/class_scope_weird.i +++ b/SWIG/Examples/test-suite/class_scope_weird.i @@ -3,9 +3,29 @@ %inline %{ class Foo { public: - int Foo::bar(int x) { - return x; - } + Foo::Foo(void) + { + } + + Foo::Foo(int) + { + } + + int Foo::bar(int x) { + return x; + } +}; + +class quat; +class matrix4; +class tacka3; + +class quat { +public: + quat::quat(void){} + quat::quat(float in_w, float x, float y, float z){} + quat::quat(const tacka3& axis, float angle){} + quat::quat(const matrix4& m){} }; %} diff --git a/SWIG/Examples/test-suite/python/class_scope_weird_runme.py b/SWIG/Examples/test-suite/python/class_scope_weird_runme.py index 359a761b9..5c91d441f 100644 --- a/SWIG/Examples/test-suite/python/class_scope_weird_runme.py +++ b/SWIG/Examples/test-suite/python/class_scope_weird_runme.py @@ -1,5 +1,6 @@ import class_scope_weird f = class_scope_weird.Foo() +g = class_scope_weird.Foo(3) if f.bar(3) != 3: raise RuntimeError