blob: 3d1c6fa8c243b9255327a5fd3741ee703e19c6c5 [file] [log] [blame]
import typemap_documentation
f = typemap_documentation.Foo()
f.x = 55
b = typemap_documentation.Bar()
b.y = 44
if 55 != typemap_documentation.GrabVal(f):
raise RuntimeError("bad value")
try:
typemap_documentation.GrabVal(b)
raise RuntimeError("unexpected exception")
except TypeError:
pass
if 55 != typemap_documentation.GrabValFooBar(f):
raise RuntimeError("bad f value")
if 44 != typemap_documentation.GrabValFooBar(b):
raise RuntimeError("bad b value")