Merge pull request #2205 from swig-fortran/extend-tests
Fix and add additional tests to test suite
This commit is contained in:
commit
e36e898c0a
30 changed files with 221 additions and 13 deletions
|
|
@ -146,7 +146,7 @@ clean:
|
|||
rm -f clientdata_prop_a.py clientdata_prop_b.py import_stl_a.py import_stl_b.py
|
||||
rm -f hugemod.h hugemod_a.i hugemod_b.i hugemod_a.py hugemod_b.py hugemod_runme.py
|
||||
rm -f imports_a.py imports_b.py mod_a.py mod_b.py multi_import_a.py
|
||||
rm -f multi_import_b.py packageoption_a.py packageoption_b.py packageoption_c.py
|
||||
rm -f multi_import_b.py multi_import_d.py packageoption_a.py packageoption_b.py packageoption_c.py
|
||||
rm -f template_typedef_cplx2.py
|
||||
|
||||
hugemod_runme = hugemod$(SCRIPTPREFIX)
|
||||
|
|
|
|||
15
Examples/test-suite/python/abstract_basecast_runme.py
Normal file
15
Examples/test-suite/python/abstract_basecast_runme.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from abstract_basecast import *
|
||||
|
||||
def check(flag):
|
||||
if not flag:
|
||||
raise RuntimeError("Test failed")
|
||||
|
||||
derived = DerivedClass()
|
||||
derived.g()
|
||||
check(isinstance(derived, BaseClass))
|
||||
check(isinstance(derived, DerivedClass))
|
||||
|
||||
base = derived.f()
|
||||
base.g()
|
||||
check(isinstance(base, BaseClass))
|
||||
check(not isinstance(base, DerivedClass))
|
||||
|
|
@ -168,6 +168,19 @@ class li_boost_shared_ptr_runme:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
# test null pointers emitted from C++
|
||||
k = li_boost_shared_ptr.sp_pointer_null()
|
||||
if (li_boost_shared_ptr.smartpointertest(k) != None):
|
||||
raise RuntimeError("return was not null")
|
||||
|
||||
k = li_boost_shared_ptr.null_sp_pointer()
|
||||
if (li_boost_shared_ptr.smartpointertest(k) != None):
|
||||
raise RuntimeError("return was not null")
|
||||
|
||||
k = li_boost_shared_ptr.sp_value_null()
|
||||
if (li_boost_shared_ptr.smartpointertest(k) != None):
|
||||
raise RuntimeError("return was not null")
|
||||
|
||||
# $owner
|
||||
k = li_boost_shared_ptr.pointerownertest()
|
||||
val = k.getValue()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue