Skip to content
Snippets Groups Projects
Commit 76588769 authored by fvrmatteo's avatar fvrmatteo
Browse files

Fixed the test case #73

parent 4cf4800d
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,15 @@ class TestX86(regress.RegressTest):
def runTest(self):
# Initialize Keystone engine
ks = Ks(KS_ARCH_X86, KS_MODE_32)
# Assemble to get back insn encoding & statement count
encoding, count = ks.asm(b"add ptr ss:[eax + ebx], 0x777")
# Assert the result
self.assertEqual(encoding, [])
try:
# Assemble to get back insn encoding & statement count
encoding, count = ks.asm(b"add ptr ss:[eax + ebx], 0x777")
expect KsError as e:
if e.errno == KS_ERR_ASM_INVALIDOPERAND:
print("Got error KS_ERR_ASM_INVALIDOPERAND as expected")
else
self.assertFalse(1, "ERROR: %s" % e)
if __name__ == '__main__'
regress.main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment