예제 #1
0
파일: test_push.py 프로젝트: Groutcho/exii
 def test_parse_ok(self):
     self.assertIsInstance(Push.parse(['ax']), Push)
예제 #2
0
파일: test_push.py 프로젝트: Groutcho/exii
 def test_execute(self):
     p = Push.parse(['ax'])
     ctx = Context(None)
     ctx.registers.set(AX, 0x0022)
     p.execute(ctx)
     self.assertEqual(ctx.stack.get(0xFFFF)[0], 0x0022)
예제 #3
0
파일: test_push.py 프로젝트: Groutcho/exii
 def test_parse_bad_number_of_arguments(self):
     self.assertRaises(SyntaxError, lambda: Push.parse(['ax,',  '2']))