diff python/testir.py @ 272:e64bae57cda8

refactor ir
author Windel Bouwman
date Sat, 31 Aug 2013 17:58:54 +0200
parents 5ec7580976d9
children ea93e0a7a31e
line wrap: on
line diff
--- a/python/testir.py	Tue Aug 20 18:56:02 2013 +0200
+++ b/python/testir.py	Sat Aug 31 17:58:54 2013 +0200
@@ -5,6 +5,7 @@
 import ir, x86, transform
 import optimize
 
+
 class IrCodeTestCase(unittest.TestCase):
     def setUp(self):
         self.b = ir.Builder()
@@ -16,12 +17,13 @@
         self.b.setFunction(f)
         bb = self.b.newBlock()
         self.b.setBlock(bb)
-        self.b.emit(ir.Return(ir.Const(0)))
+        self.b.emit(ir.Exp(ir.Const(0)))
         self.m.check()
         # Run interpreter:
         # r = self.m.getFunction('add').call(1, 2)
         #self.assertEqual(3, r)
 
+
 class ConstantFolderTestCase(unittest.TestCase):
     def setUp(self):
         self.b = ir.Builder()