/tags/rel-1-3-26/SWIG/Examples/test-suite/python/complextest_runme.py
Python | 17 lines | 11 code | 6 blank | 0 comment | 2 complexity | 4e30274c02ac586b3ef44da4b3ab90d6 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1import complextest 2 3a = complex(-1,2) 4 5if complextest.Conj(a) != a.conjugate(): 6 raise RuntimeError, "bad complex mapping" 7 8if complextest.Conjf(a) != a.conjugate(): 9 raise RuntimeError, "bad complex mapping" 10 11 12v = (complex(1,2), complex(2,3), complex(4,3), 1) 13 14try: 15 complextest.Copy_h(v) 16except: 17 pass