public void VerifyValuesOfZeroFlag(int initialValue, bool expectedResult) { var model = new ProgrammingModel(); model.GetRegister(RegisterName.Y).SetValue(initialValue); model.ZeroFlag = !expectedResult; var instruction = new Iny(); instruction.Execute(model, null, 0); Assert.That(model.ZeroFlag, Is.EqualTo(expectedResult)); }
public void IncrementsTheValueInRegisterY() { const int initialValue = 42; var model = new ProgrammingModel(); model.GetRegister(RegisterName.Y).SetValue(initialValue); var instruction = new Iny(); instruction.Execute(model, null, 0); Assert.That(model.GetRegister(RegisterName.Y).GetValue(), Is.EqualTo(initialValue + 1)); }
public void ReturnsTwoCycles() { var instruction = new Iny(); Assert.That(instruction.CyclesFor(AddressingMode.Implied), Is.EqualTo(2)); }