

def test_post_hanlder(self):

    def post_hanlder(emulator, instruction, parameter):
        paramter.append(True)
    asm = ['mov eax, ebx']
    x86_instrs = map(self._asm_parser.parse, asm)
    self.__set_address(3735928559, x86_instrs)
    reil_instrs = map(self._translator.translate, x86_instrs)
    paramter = []
    self._emulator.set_instruction_post_handler(post_hanlder, paramter)
    (reil_ctx_out, reil_mem_out) = self._emulator.execute_lite(reil_instrs[0])
    self.assertTrue((len(paramter) > 0))

dataset/ETHPy150Open programa-stic/barf-project/barf/tests/core/reil/test_reilemulator.py ReilEmulatorTests.test_post_hanlder/original