Mercurial > lcfOS
comparison test/testc3.py @ 313:04cf4d26a3bc
Added constant function
author | Windel Bouwman |
---|---|
date | Wed, 18 Dec 2013 18:02:26 +0100 |
parents | ff665880a6b0 |
children | 86b02c98a717 |
comparison
equal
deleted
inserted
replaced
312:2c9768114877 | 313:04cf4d26a3bc |
---|---|
96 import p1; | 96 import p1; |
97 var p1.A a; | 97 var p1.A a; |
98 """ | 98 """ |
99 self.expectOK([p1, p2]) | 99 self.expectOK([p1, p2]) |
100 | 100 |
101 def testConstant(self): | |
102 snip = """module C; | |
103 const int a = 2; | |
104 """ | |
105 i = self.expectOK(snip) | |
106 | |
107 @unittest.skip('Not checked yet') | |
108 def testConstantMutual(self): | |
109 snip = """module C; | |
110 const int a = b + 1; | |
111 const int b = a + 1; | |
112 function void f() | |
113 { | |
114 return b; | |
115 } | |
116 """ | |
117 i = self.expectOK(snip) | |
118 | |
101 def testPackageNotExists(self): | 119 def testPackageNotExists(self): |
102 p1 = """module p1; | 120 p1 = """module p1; |
103 import p23; | 121 import p23; |
104 """ | 122 """ |
105 self.expectErrors(p1, [0]) | 123 self.expectErrors(p1, [0]) |