From 3a75cd354ef955df30989e6435a3a5e32cb8bd3e Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Sun, 16 Mar 2003 03:55:36 +0000 Subject: [PATCH] new test git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4550 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/common.mk | 1 + Examples/test-suite/preproc_4.i | 6 +++--- Examples/test-suite/smart_pointer_const2.i | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 Examples/test-suite/smart_pointer_const2.i 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; + } +}; +%} + +