Mercurial > lcfOS
diff test/testsamples.py @ 362:c05ab629976a
Added CPUID for arm
author | Windel Bouwman |
---|---|
date | Sat, 15 Mar 2014 10:56:34 +0100 |
parents | 5ef1cb1bb54f |
children | 396e5cefba13 |
line wrap: on
line diff
--- a/test/testsamples.py Fri Mar 14 16:18:54 2014 +0100 +++ b/test/testsamples.py Sat Mar 15 10:56:34 2014 +0100 @@ -23,19 +23,21 @@ function void start() { var int i; - for (i=0;i<10;i++) + for (i=0; i<10; i++) { - io.print("A"); + io.print2("A = ", i); } } """ - self.do(snippet, "AAAAAAAAAA") + res = "".join("A = 0x{0:08X}\n".format(a) for a in range(10)) + self.do(snippet, res) class TestSamplesOnVexpress(unittest.TestCase, Samples): def do(self, src, expected_output): runner = TaskRunner() recipe_loader = RecipeLoader(runner) + print(expected_output) return # TODO: improve recipe loading?? recipe_loader.load_dict({ @@ -54,3 +56,5 @@ res = runQemu() self.assertEqual(expected_output, res) +if __name__ == '__main__': + unittest.main()