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

# · Python · 29 lines · 19 code · 10 blank · 0 comment · 9 complexity · b8185a63ac81dfae8be99eee8f04d7ad MD5 · raw file

  1. from li_cwstring import *
  2. if count(u"ab\0ab\0ab\0", 0) != 3:
  3. raise RuntimeError
  4. if test1() != u"Hello World":
  5. raise RuntimeError
  6. if test2() != u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_":
  7. raise RuntimeError
  8. if test3("hello") != u"hello-suffix":
  9. raise RuntimeError
  10. if test4("hello") != u"hello-suffix":
  11. raise RuntimeError
  12. if test5(4) != u'xxxx':
  13. raise RuntimeError
  14. if test6(10) != u'xxxxx':
  15. raise RuntimeError
  16. if test7() != u"Hello world!":
  17. raise RuntimeError
  18. if test8() != u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_":
  19. raise RuntimeError