diff test/testasm.py @ 383:173e20a47fda

Added linker description loader
author Windel Bouwman
date Sun, 27 Apr 2014 17:40:39 +0200
parents 0c44e494ef58
children d056b552d3f4
line wrap: on
line diff
--- a/test/testasm.py	Sun Apr 27 12:24:21 2014 +0200
+++ b/test/testasm.py	Sun Apr 27 17:40:39 2014 +0200
@@ -7,6 +7,7 @@
 from ppci.outstream import BinaryOutputStream
 from ppci.target.basetarget import Label
 from ppci.buildfunctions import link
+from ppci.layout import Layout
 
 
 class AssemblerLexingCase(unittest.TestCase):
@@ -60,10 +61,10 @@
     def feed(self, line):
         self.assembler.assemble(line, self.ostream)
 
-    def check(self, hexstr, layout={}):
+    def check(self, hexstr, layout=Layout()):
         self.assembler.flush()
         self.obj = link([self.obj], layout)
-        data = bytes(self.obj.get_section('.text').data)
+        data = bytes(self.obj.get_section('code').data)
         self.assertSequenceEqual(bytes.fromhex(hexstr), data)