From 2b33f39cff975fa2d39d14b06a89b29159f63593 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Thu, 20 Feb 2003 21:26:20 +0000 Subject: [PATCH] Added a broken case after the abstract_typedef case was fixed git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4371 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/abstract_typedef2.i | 31 +++++++++++++++++++ SWIG/Examples/test-suite/common.mk | 1 + .../python/abstract_typedef2_runme.py | 11 +++++++ 3 files changed, 43 insertions(+) create mode 100644 SWIG/Examples/test-suite/abstract_typedef2.i create mode 100644 SWIG/Examples/test-suite/python/abstract_typedef2_runme.py diff --git a/SWIG/Examples/test-suite/abstract_typedef2.i b/SWIG/Examples/test-suite/abstract_typedef2.i new file mode 100644 index 000000000..83a768842 --- /dev/null +++ b/SWIG/Examples/test-suite/abstract_typedef2.i @@ -0,0 +1,31 @@ +%module abstract_typedef2 + + /* + After the fix for abstract_typedef, this simpler + example got broken. + */ + +%inline %{ + + struct Engine + { + }; + + struct Object + { + virtual bool write(Engine& archive) const = 0; + }; + + + class A : public Object + { + A(int a = 0) + { + } + + bool write(Engine& archive) const + { + return true; + } + }; +%} diff --git a/SWIG/Examples/test-suite/common.mk b/SWIG/Examples/test-suite/common.mk index 7427beff7..c973b5921 100644 --- a/SWIG/Examples/test-suite/common.mk +++ b/SWIG/Examples/test-suite/common.mk @@ -42,6 +42,7 @@ DYNAMIC_LIB_PATH = $(RUNTIMEDIR):. # Broken C++ test cases. (Can be run individually using make testcase.cpptest.) CPP_TEST_BROKEN += \ + abstract_typedef2 \ cast_operator \ arrayref \ namespace_nested \ diff --git a/SWIG/Examples/test-suite/python/abstract_typedef2_runme.py b/SWIG/Examples/test-suite/python/abstract_typedef2_runme.py new file mode 100644 index 000000000..81ef27b50 --- /dev/null +++ b/SWIG/Examples/test-suite/python/abstract_typedef2_runme.py @@ -0,0 +1,11 @@ +from abstract_typedef2 import * +e = Engine() + +a = A() + + +if a.write(e) != 1: + raise RuntimeError + + +