def test_disasm_unsupported_target(): pwny.disasm(b'\x5f', target=target_unknown_32)
def test_disasm(test_target, syntax, source, result, target): output = pwny.disasm(source, syntax=syntax, target=test_target) assert output == [result], 'Got %r, expected %r' % (output, result)
def test_disasm_unsupported_target(): pwny.disasm(SOURCE_DISASM, target=target_arm_32)
def test_disasm_with_target_x86_32(): assert pwny.disasm(SOURCE_DISASM, target=target_x86_32) == RESULT_DISASM_32
def test_disasm_with_target_x86_64(): print(RESULT_DISASM_64, pwny.disasm(SOURCE_DISASM, target=target_x86_64)) assert pwny.disasm(SOURCE_DISASM, target=target_x86_64) == RESULT_DISASM_64
def test_disasm_with_default_target(): # Note: set up sets default arch to x86 32bit assert pwny.disasm(SOURCE_DISASM) == RESULT_DISASM_32