comparison test/testasm.py @ 342:86b02c98a717 devel

Moved target directory
author Windel Bouwman
date Sat, 01 Mar 2014 15:40:31 +0100
parents 4d204f6f7d4e
children 3bb7dcfe5529
comparison
equal deleted inserted replaced
341:4d204f6f7d4e 342:86b02c98a717
4 from ppci import CompilerError 4 from ppci import CompilerError
5 from ppci.asmnodes import AInstruction, ABinop, AUnop, ASymbol, ALabel, ANumber 5 from ppci.asmnodes import AInstruction, ABinop, AUnop, ASymbol, ALabel, ANumber
6 from ppci.assembler import tokenize, Assembler, Lexer 6 from ppci.assembler import tokenize, Assembler, Lexer
7 from ppci.objectfile import ObjectFile 7 from ppci.objectfile import ObjectFile
8 from ppci.linker import Linker 8 from ppci.linker import Linker
9 import outstream 9 from ppci.outstream import BinaryOutputStream
10 from target import Label 10 from ppci.target.basetarget import Label
11 11
12 12
13 class AssemblerLexingCase(unittest.TestCase): 13 class AssemblerLexingCase(unittest.TestCase):
14 """ Tests the assemblers lexer """ 14 """ Tests the assemblers lexer """
15 15
94 94
95 95
96 class OustreamTestCase(unittest.TestCase): 96 class OustreamTestCase(unittest.TestCase):
97 def test1(self): 97 def test1(self):
98 obj = ObjectFile() 98 obj = ObjectFile()
99 o = outstream.BinaryOutputStream(obj) 99 o = BinaryOutputStream(obj)
100 o.selectSection('.text') 100 o.selectSection('.text')
101 o.emit(Label('a')) 101 o.emit(Label('a'))
102 self.assertSequenceEqual(bytes(), obj.get_section('.text').data) 102 self.assertSequenceEqual(bytes(), obj.get_section('.text').data)
103 103
104 104