PageRenderTime 25ms CodeModel.GetById 22ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Python | 32 lines | 21 code | 11 blank | 0 comment | 9 complexity | 66b24cc4aed064308302919cff08e361 MD5 | raw file
 1from li_cstring import *
 2
 3
 4if count("ab\0ab\0ab\0", 0) != 3:
 5    raise RuntimeError    
 6
 7if test1() != "Hello World":
 8    raise RuntimeError
 9
10if test2() != " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_":
11    raise RuntimeError
12
13if test3("hello") != "hello-suffix":
14    print test3("hello")
15    raise RuntimeError
16
17if test4("hello") != "hello-suffix":
18    print test4("hello")
19    raise RuntimeError
20    
21if test5(4) != 'xxxx':
22    raise RuntimeError
23
24if test6(10) != 'xxxxx':
25    raise RuntimeError
26    
27if test7() !="Hello world!":
28    raise RuntimeError
29
30if test8() != " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_":
31    raise RuntimeError
32