Mercurial > lcfOS
comparison python/testzcc.py @ 276:56d37ed4b4d2
phaa
author | Windel Bouwman |
---|---|
date | Mon, 16 Sep 2013 21:51:17 +0200 |
parents | f5fba5b554d7 |
children |
comparison
equal
deleted
inserted
replaced
275:6f2423df0675 | 276:56d37ed4b4d2 |
---|---|
7 class ZccTestCase(unittest.TestCase): | 7 class ZccTestCase(unittest.TestCase): |
8 """ Tests the compiler driver """ | 8 """ Tests the compiler driver """ |
9 | 9 |
10 def do(self, fn): | 10 def do(self, fn): |
11 """ Compile blink.c3 """ | 11 """ Compile blink.c3 """ |
12 #args = zcc.parser.parse_args(['-d', 'stm32f4/blink.c3']) | 12 args = zcc.parser.parse_args([fn, '--package_dir', './c3/examples']) |
13 args = zcc.parser.parse_args([fn]) | |
14 zcc.main(args) | 13 zcc.main(args) |
15 | 14 |
16 def testExamples(self): | 15 def testExamples(self): |
17 """ Test all examples in the c3/examples directory """ | 16 """ Test all examples in the c3/examples directory """ |
18 example_filenames = glob.glob('./stm32f4/*.c3') | 17 example_filenames = glob.glob('./c3/examples/*.c3') |
19 for filename in example_filenames: | 18 for filename in example_filenames: |
20 self.do(filename) | 19 self.do(filename) |
21 | 20 |
22 def testSectionAddress(self): | 21 def testSectionAddress(self): |
23 src = "package tst; function void t2() {var int t3; t3 = 2;}" | 22 src = "package tst; function void t2() {var int t3; t3 = 2;}" |