Mercurial > lcfOS
comparison test/testasm.py @ 385:d056b552d3f4
Made better use of layout
author | Windel Bouwman |
---|---|
date | Thu, 01 May 2014 14:03:12 +0200 |
parents | 173e20a47fda |
children |
comparison
equal
deleted
inserted
replaced
384:94f5b719ad0b | 385:d056b552d3f4 |
---|---|
61 def feed(self, line): | 61 def feed(self, line): |
62 self.assembler.assemble(line, self.ostream) | 62 self.assembler.assemble(line, self.ostream) |
63 | 63 |
64 def check(self, hexstr, layout=Layout()): | 64 def check(self, hexstr, layout=Layout()): |
65 self.assembler.flush() | 65 self.assembler.flush() |
66 self.obj = link([self.obj], layout) | 66 self.obj = link([self.obj], layout, self.target) |
67 data = bytes(self.obj.get_section('code').data) | 67 data = bytes(self.obj.get_section('code').data) |
68 self.assertSequenceEqual(bytes.fromhex(hexstr), data) | 68 self.assertSequenceEqual(bytes.fromhex(hexstr), data) |
69 | 69 |
70 | 70 |
71 if __name__ == '__main__': | 71 if __name__ == '__main__': |