PageRenderTime 44ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/python/cpp_enum_runme.py

#
Python | 23 lines | 17 code | 6 blank | 0 comment | 4 complexity | aca2440e8a63ec4302f0634f1c8a2b1a MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import cpp_enum
  2. f = cpp_enum.Foo()
  3. if f.hola != f.Hello:
  4. print f.hola
  5. raise RuntimeError
  6. f.hola = f.Hi
  7. if f.hola != f.Hi:
  8. print f.hola
  9. raise RuntimeError
  10. f.hola = f.Hello
  11. if f.hola != f.Hello:
  12. print f.hola
  13. raise RuntimeError
  14. cpp_enum.cvar.hi = cpp_enum.Hello
  15. if cpp_enum.cvar.hi != cpp_enum.Hello:
  16. print cpp_enum.cvar.hi
  17. raise RuntimeError