comparison test/testir.py @ 300:158068af716c

yafm
author Windel Bouwman
date Tue, 03 Dec 2013 18:00:22 +0100
parents 534b94b40aa8
children 6753763d3bec
comparison
equal deleted inserted replaced
299:674789d9ff37 300:158068af716c
1 import unittest, os 1 import unittest, os
2 import sys 2 import sys
3 import c3
4 import ppci 3 import ppci
5 import ir 4 import ir
6 import transform 5 from ppci.transform import ConstantFolder
7 import optimize
8 6
9 7
10 class IrCodeTestCase(unittest.TestCase): 8 class IrCodeTestCase(unittest.TestCase):
11 def setUp(self): 9 def setUp(self):
12 self.b = ir.Builder() 10 self.b = ir.Builder()
51 49
52 50
53 class ConstantFolderTestCase(unittest.TestCase): 51 class ConstantFolderTestCase(unittest.TestCase):
54 def setUp(self): 52 def setUp(self):
55 self.b = ir.Builder() 53 self.b = ir.Builder()
56 self.cf = transform.ConstantFolder() 54 self.cf = ConstantFolder()
57 self.m = ir.Module('test') 55 self.m = ir.Module('test')
58 self.b.setModule(self.m) 56 self.b.setModule(self.m)
59 57
60 def testBuilder(self): 58 def testBuilder(self):
61 f = self.b.newFunction('test') 59 f = self.b.newFunction('test')