comparison python/testasm.py @ 194:b01429a5d695

Fixed test
author Windel Bouwman
date Wed, 29 May 2013 22:36:37 +0200
parents f091e7d70996
children 37ac6c016e0f
comparison
equal deleted inserted replaced
193:f091e7d70996 194:b01429a5d695
33 list(libasm.tokenize(asmline)) 33 list(libasm.tokenize(asmline))
34 34
35 def testParse(self): 35 def testParse(self):
36 asmline = 'lab1: mov rax, rbx' 36 asmline = 'lab1: mov rax, rbx'
37 a = libasm.Assembler() 37 a = libasm.Assembler()
38 a.assembleLine(asmline) 38 a.parse_line(asmline)
39 39
40 def testParse2(self): 40 def testParse2(self):
41 asmline = 'a: mov rax, [rbx + 2]' 41 asmline = 'a: mov rax, [rbx + 2]'
42 a = libasm.Assembler() 42 a = libasm.Assembler()
43 a.assembleLine(asmline) 43 a.parse_line(asmline)
44
45 def testParse3(self):
46 # A label must be optional:
47 asmline = 'mov rax, 1'
48 a = libasm.Assembler()
49 a.parse_line(asmline)
44 50
45 if __name__ == '__main__': 51 if __name__ == '__main__':
46 unittest.main() 52 unittest.main()
47 53