public void Test_SCF() { var expectedState = new CpuState(); expectedState.Registers.CarryFlag = true; var actualState = new CpuState(); actualState.Registers.HalfCarryFlag = true; actualState.Registers.SubtractionFlag = true; var memoryMock = new Mock <IRandomAccessMemory>(); var instruction = new SCF(); instruction.Initialize(); //act while (!instruction.IsFetchNecessary()) { instruction.ExecuteCycle(actualState, memoryMock.Object); } TestHelper.AssertCpuState(expectedState, actualState); memoryMock.Verify(m => m.WriteByte(It.IsAny <ushort>(), It.IsAny <byte>()), Times.Never); }
public static extern int SendMessage(IntPtr hWnd, EditMessage msg, SCF wParam, ref CHARFORMAT2 fmt);
internal static extern int SendMessage(IntPtr hWnd, EM msg, SCF wParam, ref CHARFORMAT2 fmt);