From 5ae083be8a7bd6407cc03ce0df8ee10a3247e3be Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Wed, 28 May 2003 17:30:04 +0000 Subject: [PATCH] new test git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4824 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/common.mk | 1 + .../test-suite/python/typedef_class_runme.py | 7 +++++++ SWIG/Examples/test-suite/typedef_class.i | 17 +++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 SWIG/Examples/test-suite/python/typedef_class_runme.py create mode 100644 SWIG/Examples/test-suite/typedef_class.i diff --git a/SWIG/Examples/test-suite/common.mk b/SWIG/Examples/test-suite/common.mk index 71ecc994e..228ea2529 100644 --- a/SWIG/Examples/test-suite/common.mk +++ b/SWIG/Examples/test-suite/common.mk @@ -43,6 +43,7 @@ DYNAMIC_LIB_PATH = $(RUNTIMEDIR):. # Broken C++ test cases. (Can be run individually using make testcase.cpptest.) CPP_TEST_BROKEN += \ + typedef_class \ array_typedef_memberin \ exception_order \ template_default_arg \ diff --git a/SWIG/Examples/test-suite/python/typedef_class_runme.py b/SWIG/Examples/test-suite/python/typedef_class_runme.py new file mode 100644 index 000000000..71436b399 --- /dev/null +++ b/SWIG/Examples/test-suite/python/typedef_class_runme.py @@ -0,0 +1,7 @@ +import typedef_class + +a = typedef_class.RealA() +a.a = 3 + +b = typedef_class.B() +b.testA(a) diff --git a/SWIG/Examples/test-suite/typedef_class.i b/SWIG/Examples/test-suite/typedef_class.i new file mode 100644 index 000000000..a1c1f600b --- /dev/null +++ b/SWIG/Examples/test-suite/typedef_class.i @@ -0,0 +1,17 @@ +%module typedef_class + +%inline %{ +class RealA +{ + public: + int a; +}; + +class B +{ + public: + typedef RealA A2; + int testA (const A2& a) {return a.a;} +}; + +%}