Skip to content
Snippets Groups Projects
Commit c94f0225 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Fixed basic block unit test.

parent 95f32aab
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,11 @@ class TestDataflow(unittest.TestCase):
def test_find_basic_blocks(self):
s = self.statements
self.assertEqual(map(lambda b: b.statements, find_basic_blocks(s)), \
[B(s[:2]).statements, B(s[2:4]).statements, \
B(s[4:]).statements])
self.assertEqual(
map(lambda b: b.statements, find_basic_blocks(s)[:-1]),
[B(s[:2]).statements, B(s[2:4]).statements,
B(s[4:]).statements]
)
def test_generate_flow_graph_simple(self):
b1 = B([S('command', 'foo'), S('command', 'j', 'b2')])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment