diff options
| -rw-r--r-- | example/symbol_exec/single_instr.py | 5 | ||||
| -rwxr-xr-x | test/ir/symbexec.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/example/symbol_exec/single_instr.py b/example/symbol_exec/single_instr.py index 3e418e5a..c31de738 100644 --- a/example/symbol_exec/single_instr.py +++ b/example/symbol_exec/single_instr.py @@ -37,5 +37,6 @@ symb.dump_mem() # Check final status eax, ebx = ira.arch.regs.EAX, ira.arch.regs.EBX -assert symb.symbols[eax] == symbols_init[ebx] -assert eax in symb.modified() +final_state = symb.as_assignblock() +assert final_state[eax] == symbols_init[ebx] +assert eax in final_state diff --git a/test/ir/symbexec.py b/test/ir/symbexec.py index e2bd411f..f8d8c7bf 100755 --- a/test/ir/symbexec.py +++ b/test/ir/symbexec.py @@ -75,6 +75,10 @@ class TestSymbExec(unittest.TestCase): self.assertEqual(e.apply_expr(assignblk.dst2ExprAff(id_x)), addr0) self.assertEqual(e.apply_expr(id_x), addr0) + # state + self.assertEqual(e.as_assignblock().get_r(), set([id_x, id_y])) + + if __name__ == '__main__': testsuite = unittest.TestLoader().loadTestsFromTestCase(TestSymbExec) report = unittest.TextTestRunner(verbosity=2).run(testsuite) |