Fix a lots of bugs in the newbinding to pass all the tests.

NOTE: debug info has not been implemented yet.
This commit is contained in:
Siu Kwan Lam 2013-02-13 15:09:26 -06:00
commit a09394cacd
32 changed files with 2419 additions and 546 deletions

View file

@ -49,6 +49,7 @@ class TestOperands(unittest.TestCase):
i1 = test_func.basic_blocks[0].instructions[0]
i2 = test_func.basic_blocks[0].instructions[1]
logging.debug("Testing User.operand_count ..")
self.assertEqual(i1.operand_count, 3)
@ -61,6 +62,7 @@ class TestOperands(unittest.TestCase):
self.assert_(i1.operands[1] is test_func.args[1])
self.assert_(i2.operands[0] is i1)
self.assert_(i2.operands[1] is test_func.args[2])
self.assertEqual(len(i1.operands), 3)
self.assertEqual(len(i2.operands), 2)