swig/Examples/test-suite/python/implicittest_runme.py
Marcelo Matus 7e25ede10d more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-21 23:38:59 +00:00

17 lines
297 B
Python

from implicittest import *
b = B()
ai = A(1)
ad = A(2.0)
ab = A(b)
ai, get(ai)
ad, get(ad)
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"