208
|
1 import unittest
|
237
|
2 import glob
|
208
|
3 import zcc
|
|
4
|
|
5 class ZccTestCase(unittest.TestCase):
|
|
6 """ Tests the compiler driver """
|
|
7
|
237
|
8 def do(self, fn):
|
208
|
9 """ Compile blink.c3 """
|
235
|
10 #args = zcc.parser.parse_args(['-d', 'stm32f4/blink.c3'])
|
237
|
11 args = zcc.parser.parse_args([fn])
|
208
|
12 zcc.main(args)
|
|
13
|
237
|
14 def testExamples(self):
|
|
15 """ Test all examples in the c3/examples directory """
|
|
16 example_filenames = glob.glob('./stm32f4/*.c3')
|
|
17 for filename in example_filenames:
|
|
18 self.do(filename)
|
|
19
|
208
|
20 if __name__ == '__main__':
|
|
21 unittest.main()
|
|
22
|