mirror of
https://github.com/mnaberez/py65.git
synced 2025-01-22 13:31:39 +00:00
Assert that decorated addressing modes are valid.
This commit is contained in:
parent
ab9337bb5a
commit
b73b080983
@ -1,5 +1,6 @@
|
||||
import unittest
|
||||
import sys
|
||||
import py65.assembler
|
||||
import py65.devices.mpu6502
|
||||
|
||||
class Common6502Tests:
|
||||
@ -4579,6 +4580,14 @@ class Common6502Tests:
|
||||
self.assertEquals(mpu.ZERO, mpu.flags & mpu.ZERO)
|
||||
self.assertEquals(0x0001, mpu.pc)
|
||||
|
||||
def test_decorated_addressing_modes_are_valid(self):
|
||||
valid_modes = map(lambda x: x[0],
|
||||
py65.assembler.Assembler.Addressing)
|
||||
mpu = self._make_mpu()
|
||||
for name, mode in mpu.disassemble:
|
||||
self.assert_(mode in valid_modes)
|
||||
|
||||
|
||||
# Test Helpers
|
||||
|
||||
def _write(self, memory, start_address, bytes):
|
||||
|
Loading…
x
Reference in New Issue
Block a user