Mercurial > lcfOS
diff test/testc3.py @ 288:a747a45dcd78
Various styling work
author | Windel Bouwman |
---|---|
date | Thu, 21 Nov 2013 14:26:13 +0100 |
parents | 1c7c1e619be8 |
children | 534b94b40aa8 |
line wrap: on
line diff
--- a/test/testc3.py Thu Nov 21 11:57:27 2013 +0100 +++ b/test/testc3.py Thu Nov 21 14:26:13 2013 +0100 @@ -130,6 +130,18 @@ """ self.expectOK([io.StringIO(s) for s in (p1, p2)]) + def testPackageMutual(self): + p1 = """module p1; + import p2; + type int A; + var p2.B b; + """ + p2 = """module p2; + import p1; + var p1.A a; + """ + self.expectOK([io.StringIO(s) for s in (p1, p2)]) + def testFunctArgs(self): snippet = """ module testargs; @@ -363,7 +375,6 @@ *cast<gpio>(*a); } """ - # TODO: remove the duplicate error: self.expectErrors(snippet, [7, 7]) def testComplexType(self): @@ -401,13 +412,13 @@ """ self.expectOK(snippet) + @unittest.skip('To be rewritten') def testExamples(self): """ Test all examples in the c3/examples directory """ - example_filenames = glob.glob('./c3/examples/*.c3') + example_filenames = glob.glob('./c3examples/*.c3') for filename in example_filenames: with open(filename, 'r') as f: - src = f.read() - self.expectOK(src, pack_dir='./c3/examples') + self.expectOK(f) def test2(self): # testsrc2 is valid code: