diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index 18bc1de6c..84dc6ab5e 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -152,6 +152,7 @@ CPP_TEST_CASES += \ return_value_scope \ rname \ smart_pointer_const \ + smart_pointer_const2 \ smart_pointer_multi \ smart_pointer_multi_typedef \ smart_pointer_not \ diff --git a/Examples/test-suite/preproc_4.i b/Examples/test-suite/preproc_4.i index 783ed2e64..e5580b51f 100644 --- a/Examples/test-suite/preproc_4.i +++ b/Examples/test-suite/preproc_4.i @@ -1,17 +1,17 @@ %module preproc_4 %{ - inline int hello0() + int hello0() { return 0; } - inline int hello1() + int hello1() { return 1; } - inline int hello2() + int hello2() { return 2; } diff --git a/Examples/test-suite/smart_pointer_const2.i b/Examples/test-suite/smart_pointer_const2.i new file mode 100644 index 000000000..aa0d4abe2 --- /dev/null +++ b/Examples/test-suite/smart_pointer_const2.i @@ -0,0 +1,20 @@ +%module smart_pointer_const2 + +%inline %{ +struct Foo { + int x; + int getx() const { return x; } + int test() { return x; } +}; + +class Bar { + Foo *f; +public: + Bar(Foo *f) : f(f) { } + const Foo *operator->() { + return f; + } +}; +%} + +