Mercurial > lcfOS
comparison python/testasm.py @ 207:8b2f20aae086
cleaning of files
author | Windel Bouwman |
---|---|
date | Sat, 29 Jun 2013 10:05:42 +0200 |
parents | 6c6bf8890d8a |
children | 62386bcee1ba |
comparison
equal
deleted
inserted
replaced
206:6c6bf8890d8a | 207:8b2f20aae086 |
---|---|
181 def testSequence1(self): | 181 def testSequence1(self): |
182 self.feed('mov r5, 3') | 182 self.feed('mov r5, 3') |
183 self.feed('add r4, r5, 0') | 183 self.feed('add r4, r5, 0') |
184 self.feed('loop: add r6, r4, 7') | 184 self.feed('loop: add r6, r4, 7') |
185 self.feed('cmp r6, 5') | 185 self.feed('cmp r6, 5') |
186 #self.a.assemble('ble loop') | 186 self.check('0325 2c1c e61d 052e') |
187 #self.assertEqual(bytes.fromhex('0325 2c1c e61d 052e fcdd'), self.a.binout) | |
188 self.assertEqual(bytes.fromhex('0325 2c1c e61d 052e'), self.a.binout) # without branch | |
189 | |
190 | 187 |
191 if __name__ == '__main__': | 188 if __name__ == '__main__': |
192 #cProfile.run('unittest.main()') | 189 #cProfile.run('unittest.main()') |
193 unittest.main() | 190 unittest.main() |
194 | 191 |