comparison test/testzcc.py @ 286:d9df72971cbf

Changed package to module
author Windel Bouwman
date Fri, 15 Nov 2013 13:52:32 +0100
parents 05184b95fa16
children 1c7c1e619be8
comparison
equal deleted inserted replaced
285:e64c8c03128f 286:d9df72971cbf
2 import glob 2 import glob
3 import zcc 3 import zcc
4 import outstream 4 import outstream
5 import ppci 5 import ppci
6 6
7
7 class ZccTestCase(unittest.TestCase): 8 class ZccTestCase(unittest.TestCase):
8 """ Tests the compiler driver """ 9 """ Tests the compiler driver """
9 10
10 def do(self, fn): 11 def do(self, fn):
11 """ Compile blink.c3 """ 12 """ Compile blink.c3 """
12 args = zcc.parser.parse_args([fn, '--package_dir', './c3examples']) 13 args = zcc.parser.parse_args([fn, '--package_dir', './c3examples/'])
13 zcc.main(args) 14 self.assertEqual(0, zcc.main(args))
14 15
15 def testExamples(self): 16 def testExamples(self):
16 """ Test all examples in the c3/examples directory """ 17 """ Test all examples in the c3/examples directory """
17 example_filenames = glob.glob('./c3examples/*.c3') 18 example_filenames = glob.glob('./c3examples/*.c3')
18 for filename in example_filenames: 19 for filename in example_filenames: