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
This commit is contained in:
parent
5521aecb6c
commit
2b33f39cff
3 changed files with 43 additions and 0 deletions
31
SWIG/Examples/test-suite/abstract_typedef2.i
Normal file
31
SWIG/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.)
|
# Broken C++ test cases. (Can be run individually using make testcase.cpptest.)
|
||||||
CPP_TEST_BROKEN += \
|
CPP_TEST_BROKEN += \
|
||||||
|
abstract_typedef2 \
|
||||||
cast_operator \
|
cast_operator \
|
||||||
arrayref \
|
arrayref \
|
||||||
namespace_nested \
|
namespace_nested \
|
||||||
|
|
|
||||||
11
SWIG/Examples/test-suite/python/abstract_typedef2_runme.py
Normal file
11
SWIG/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