/tags/rel-1-3-25/SWIG/Examples/test-suite/python/typename_runme.py

# · Python · 12 lines · 10 code · 2 blank · 0 comment · 2 complexity · dcb251fb749b7cc2d2d57ec904d6572c MD5 · raw file

  1. import typename
  2. import types
  3. f = typename.Foo()
  4. b = typename.Bar()
  5. x = typename.twoFoo(f)
  6. if not isinstance(x,types.FloatType):
  7. print "Wrong return type!"
  8. y = typename.twoBar(b)
  9. if not isinstance(y,types.IntType):
  10. print "Wrong return type!"