PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Python | 38 lines | 29 code | 9 blank | 0 comment | 6 complexity | fcc513645e60a4f6f8390c9dbad1b686 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import constover
  2. import sys
  3. error = 0
  4. p = constover.test("test")
  5. if p != "test":
  6. print "test failed!"
  7. error = 1
  8. p = constover.test_pconst("test")
  9. if p != "test_pconst":
  10. print "test_pconst failed!"
  11. error = 1
  12. f = constover.Foo()
  13. p = f.test("test")
  14. if p != "test":
  15. print "member-test failed!"
  16. error = 1
  17. p = f.test_pconst("test")
  18. if p != "test_pconst":
  19. print "member-test_pconst failed!"
  20. error = 1
  21. p = f.test_constm("test")
  22. if p != "test_constmethod":
  23. print "member-test_constm failed!"
  24. error = 1
  25. p = f.test_pconstm("test")
  26. if p != "test_pconstmethod":
  27. print "member-test_pconstm failed!"
  28. error = 1
  29. sys.exit(error)