swig/Examples/test-suite/python/implicittest_runme.py
Marcelo Matus 49f0823a25 more test files for STL
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 09:52:22 +00:00

17 lines
315 B
Python

from implicittest import *
b = B()
ai = A(1)
ad = A(2.0)
ab = A(b)
print ai, get(ai)
print ad, get(ad)
print ab, get(ab)
if get(ai) != get(1):
raise RuntimeError,"bad implicit type"
if get(ad) != get(2.0):
raise RuntimeError,"bad implicit type"
if get(ab) != get(b):
raise RuntimeError,"bad implicit type"