swig/Examples/test-suite/python/overload_extendc_runme.py
Jon Schlueter b77f3afafb autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
2015-05-08 21:35:52 -04:00

21 lines
469 B
Python

import overload_extendc
f = overload_extendc.Foo()
if f.test(3) != 1:
raise RuntimeError
if f.test("hello") != 2:
raise RuntimeError
if f.test(3.5, 2.5) != 3:
raise RuntimeError
if f.test("hello", 20) != 1020:
raise RuntimeError
if f.test("hello", 20, 100) != 120:
raise RuntimeError
# C default args
if f.test(f) != 30:
raise RuntimeError
if f.test(f, 100) != 120:
raise RuntimeError
if f.test(f, 100, 200) != 300:
raise RuntimeError