Added a broken case after the abstract_typedef case was fixed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4371 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b7489d6796
commit
2c715f8272
3 changed files with 43 additions and 0 deletions
31
Examples/test-suite/abstract_typedef2.i
Normal file
31
Examples/test-suite/abstract_typedef2.i
Normal file
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
%}
|
||||
|
|
@ -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 \
|
||||
|
|
|
|||
11
Examples/test-suite/python/abstract_typedef2_runme.py
Normal file
11
Examples/test-suite/python/abstract_typedef2_runme.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from abstract_typedef2 import *
|
||||
e = Engine()
|
||||
|
||||
a = A()
|
||||
|
||||
|
||||
if a.write(e) != 1:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue