def test_abs_y(self): "Test absolute Y addressing mode" operands = '$4400, y' expected = 'abs y' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)
def test_ind_y(self): "Test indirect Y addressing mode" operands = '($44), y' expected = 'ind y' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)
def test_zp_x(self): "Test zero page X addressing mode" operands = '$44, x' expected = 'zp x' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)
def test_immediate(self): "Test immediate addressing mode" operands = '#$44' expected = 'imm' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)
def test_implied(self): "Test implied addressing mode" operands = '' expected = 'imp' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)
def test_relative(self): "Test relative addressing mode" operands = 'test_label' expected = 'rel' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)
def test_accumulator(self): "Test accumulator addressing mode" operands = 'a' expected = 'acc' result = oddball.parse_addr_mode(operands) self.assertEqual(expected, result)