view python/testzcc.py @ 243:ef683881c64e

Remove various files
author Windel Bouwman
date Tue, 23 Jul 2013 16:50:02 +0200
parents 81752b0f85a5
children f5fba5b554d7
line wrap: on
line source

import unittest
import glob
import zcc

class ZccTestCase(unittest.TestCase):
    """ Tests the compiler driver """

    def do(self, fn):
        """ Compile blink.c3 """
        #args = zcc.parser.parse_args(['-d', 'stm32f4/blink.c3'])
        args = zcc.parser.parse_args([fn])
        zcc.main(args)

    def testExamples(self):
        """ Test all examples in the c3/examples directory """
        example_filenames = glob.glob('./stm32f4/*.c3')
        for filename in example_filenames:
            self.do(filename)

if __name__ == '__main__':
    unittest.main()