Ejemplo n.º 1
0
 def test_copy(self):
     block = BasicBlock([Instr("NOP")])
     next_block = BasicBlock()
     block.next_block = next_block
     self.assertEqual(block, block.copy())
     self.assertIs(next_block, block.copy().next_block)
Ejemplo n.º 2
0
 def test_slice(self):
     block = BasicBlock([Instr("NOP")])
     next_block = BasicBlock()
     block.next_block = next_block
     self.assertEqual(block, block[:])
     self.assertIs(next_block, block[:].next_block)