From 6dd2312e6aadcd2999be858e0396349a584b8dd4 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Sun, 21 Aug 2011 12:01:42 -0700 Subject: [PATCH] Wrap lines at 80 columns --- src/py65/tests/devices/test_mpu6502.py | 33 +++++++++++++++----------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/py65/tests/devices/test_mpu6502.py b/src/py65/tests/devices/test_mpu6502.py index 221b530..f0adbfa 100644 --- a/src/py65/tests/devices/test_mpu6502.py +++ b/src/py65/tests/devices/test_mpu6502.py @@ -18,24 +18,29 @@ class Common6502Tests: self.assertEqual(mpu.BREAK | mpu.UNUSED, mpu.p) # Benchmark - # $0000 d8 CLD - # $0001 18 CLC - # $0002 a9 00 LDA #$00 - # $0004 a2 00 LDX #$00 - # $0006 a0 00 LDY #$00 - # $0008 c8 INY - # $0009 d0 fd BNE $0008 - # $000b e8 INX - # $000c d0 f8 BNE $0006 - # $000e 69 01 ADC #$01 - # $0010 d0 f2 BNE $0004 - # $0012 00 BRK def test_benchmark(self): mpu = self._make_mpu() - self._write(mpu.memory, 0x0000, (0xd8, 0x18, 0xa9, 0x00, 0xa2, 0x00, 0xa0, 0x00, 0xc8, 0xd0, 0xfd, 0xe8, 0xd0, 0xf8, 0x69, 0x01, 0xd0, 0xf2, 0x00, 0xed)) - for i in range(1,100): # need a larger limit for this test to dominate the test time (but when benchmarking it doesn't need to pass) + self._write(mpu.memory, 0x0000, ( + 0xd8, # $0000 d8 CLD + 0x18, # $0001 18 CLC + 0xa9, 0x00, # $0002 a9 00 LDA #$00 + 0xa2, 0x00, # $0004 a2 00 LDX #$00 + 0xa0, 0x00, # $0006 a0 00 LDY #$00 + 0xc8, # $0008 c8 INY + 0xd0, 0xfd, # $0009 d0 fd BNE $0008 + 0xe8, # $000b e8 INX + 0xd0, 0xf8, # $000c d0 f8 BNE $0006 + 0x69, 0x01, # $000e 69 01 ADC #$01 + 0xd0, 0xf2, # $0010 d0 f2 BNE $0004 + 0x00, # $0012 00 BRK + 0xed)) + + # need a larger limit for this test to dominate the test time + # (but when benchmarking it doesn't need to pass) + for i in range(1,100): mpu.step() + self.assertEqual(47, mpu.y) self.assertEqual(0, mpu.x) self.assertEqual(0, mpu.a)