public void EX_AF_AF2Test() { PrivateObject param0 = new PrivateObject(new Z80(new Memory48K())); Z80_Accessor target = new Z80_Accessor(param0); target.A = 0x99; target.F = (target.F & 0x00); target.A2 = 0x59; target.F2 = Flag.Carry & Flag.HalfCarry & Flag.F3 & Flag.F5 & Flag.ParityOverflow & Flag.Sign & Flag.Subtract & Flag.Zero; target.EX_AF_AF2(); Assert.IsTrue(target.A == 0x59 && target.F == (Flag.Carry & Flag.HalfCarry & Flag.F3 & Flag.F5 & Flag.ParityOverflow & Flag.Sign & Flag.Subtract & Flag.Zero) && target.A2 == 0x99 && target.F2 == 0, "Error: EX AF, AF'"); }