Commit 0b393a4a authored by Jayke Meijer's avatar Jayke Meijer

Merge branch 'master' of github.com:taddeus/peephole

parents 3cadb493 ae2cc948
...@@ -20,9 +20,11 @@ class TestDataflow(unittest.TestCase): ...@@ -20,9 +20,11 @@ class TestDataflow(unittest.TestCase):
def test_find_basic_blocks(self): def test_find_basic_blocks(self):
s = self.statements s = self.statements
self.assertEqual(map(lambda b: b.statements, find_basic_blocks(s)), \ self.assertEqual(
[B(s[:2]).statements, B(s[2:4]).statements, \ map(lambda b: b.statements, find_basic_blocks(s)[:-1]),
B(s[4:]).statements]) [B(s[:2]).statements, B(s[2:4]).statements,
B(s[4:]).statements]
)
def test_generate_flow_graph_simple(self): def test_generate_flow_graph_simple(self):
b1 = B([S('command', 'foo'), S('command', 'j', 'b2')]) b1 = B([S('command', 'foo'), S('command', 'j', 'b2')])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment