swig/Examples/test-suite/python/default_arg_values_runme.py
Olly Betts c2972b8bf0 [Python] Deal with an integer as the default value of a bool
parameter in the C++ prototype.  Fixes github #327, reported by
Greg Allen.
2015-05-07 16:25:32 +12:00

22 lines
398 B
Python

from default_arg_values import *
d = Display()
if d.draw1() != 0:
raise RuntimeError
if d.draw1(12) != 12:
raise RuntimeError
p = createPtr(123);
if d.draw2() != 0:
raise RuntimeError
if d.draw2(p) != 123:
raise RuntimeError
if d.bool0() != False or type(d.bool0()) != type(False):
raise RuntimeError
if d.bool1() != True or type(d.bool1()) != type(True):
raise RuntimeError