Mercurial > lcfOS
diff python/testzcc.py @ 250:f5fba5b554d7
Removal of obsolete editor
author | Windel Bouwman |
---|---|
date | Sun, 28 Jul 2013 19:07:51 +0200 |
parents | 81752b0f85a5 |
children | 56d37ed4b4d2 |
line wrap: on
line diff
--- a/python/testzcc.py Fri Jul 26 20:26:05 2013 +0200 +++ b/python/testzcc.py Sun Jul 28 19:07:51 2013 +0200 @@ -1,6 +1,8 @@ import unittest import glob import zcc +import outstream +import ppci class ZccTestCase(unittest.TestCase): """ Tests the compiler driver """ @@ -17,6 +19,17 @@ for filename in example_filenames: self.do(filename) + def testSectionAddress(self): + src = "package tst; function void t2() {var int t3; t3 = 2;}" + diag = ppci.DiagnosticsManager() + outs = outstream.TextOutputStream() + self.assertTrue(zcc.zcc(src, outs, diag)) + code = outs.getSection('code') + self.assertEqual(0x08000000, code.address) + data = outs.getSection('data') + self.assertEqual(0x20000000, data.address) + + if __name__ == '__main__': unittest.main()