PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 2ms 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
 1import constover
 2import sys
 3error = 0
 4
 5p = constover.test("test")
 6if p != "test":
 7    print "test failed!"
 8    error = 1
 9
10p = constover.test_pconst("test")
11if p != "test_pconst":
12    print "test_pconst failed!"
13    error = 1
14    
15f = constover.Foo()
16p = f.test("test")
17if p != "test":
18    print "member-test failed!"
19    error = 1
20
21p = f.test_pconst("test")
22if p != "test_pconst":
23    print "member-test_pconst failed!"
24    error = 1
25
26p = f.test_constm("test")
27if p != "test_constmethod":
28    print "member-test_constm failed!"
29    error = 1
30
31p = f.test_pconstm("test")
32if p != "test_pconstmethod":
33    print "member-test_pconstm failed!"
34    error = 1
35    
36sys.exit(error)
37
38