public void Ife_RegisterOperandsAreNotEqual_PCSkipsNextInstructionAndOperands() { var prev = new MutableState() .Set(Register.A, 1).Set(Register.B, 2) .Set((ushort)0, 0x7C02) .Set((ushort)1, 0x002A); var state = new Ife(new Reg(Register.A), new Reg(Register.B)).Apply(prev); Assert.AreEqual(2, state.Get(Register.PC)); }
public void Ife_RegisterOperandsAreEqual_PCIsNotUpdated() { var prev = new MutableState().Set(Register.A, 1).Set(Register.B, 1); var state = new Ife(new Reg(Register.A), new Reg(Register.B)).Apply(prev); Assert.AreEqual(0, state.Get(Register.PC)); }