diff python/testc3.py @ 168:49f1ab80d040

Added awesome icons
author Windel Bouwman
date Fri, 22 Mar 2013 19:09:38 +0100
parents 0b5b2ee6b435
children ee0d30533dae
line wrap: on
line diff
--- a/python/testc3.py	Fri Mar 22 17:40:13 2013 +0100
+++ b/python/testc3.py	Fri Mar 22 19:09:38 2013 +0100
@@ -64,7 +64,6 @@
    x86gen = x86.X86CodeGen(diag)
    ok = len(diag.diags) == 0
    if not ok:
-      print('Not generating code')
       return
    print('generating x86 code')
    x86gen.genBin(ir)
@@ -94,7 +93,9 @@
       """
       self.diag.clear()
       ir = self.builder.build(snippet)
-      print(self.diag.diags)
+      assert len(self.diag.diags) == 2
+      assert self.diag.diags[0].loc.row == 5
+      assert self.diag.diags[1].loc.row == 6
 
    def testExpressions(self):
       snippet = """
@@ -111,7 +112,11 @@
       """
       self.diag.clear()
       ir = self.builder.build(snippet)
-      print(self.diag.diags)
+      assert len(self.diag.diags) == 3
+      assert self.diag.diags[0].loc.row == 8
+      assert self.diag.diags[1].loc.row == 9
+      assert self.diag.diags[2].loc.row == 10
+      assert ir == None
 
 if __name__ == '__main__':
    do()