PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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 *)"