/tags/rel-1-3-15/SWIG/Examples/test-suite/python/using_composition_runme.py

# · Python · 11 lines · 8 code · 3 blank · 0 comment · 3 complexity · 612e67a0d06d628b020cde54f369cfb5 MD5 · raw file

  1. from using_composition import *
  2. f = FooBar()
  3. if f.blah(3) != 3:
  4. raise RuntimeError,"blah(int)"
  5. if f.blah(3.5) != 3.5:
  6. raise RuntimeError,"blah(double)"
  7. if f.blah("hello") != "hello":
  8. raise RuntimeError,"blah(char *)"