static (GraphFactory, IDataSource) MakeGraphAndData() { var graph = new GraphFactory(_cpu); var data = graph.CreateDataSource(And.Get()); return(graph, data); }
public void And_RegisterOperands_ResultIsCorrect() { var prev = new MutableState().Set(Register.A, 6).Set(Register.B, 5); var state = new And(new Reg(Register.A), new Reg(Register.B)).Apply(prev); Assert.AreEqual(0x04, state.Get(Register.A)); }