public void enumerateNumTest() { var pins1 = new ProcessorPins(); pins1.Set(2, true); pins1.Set(7, true); var pins = pins1.Enumerate(); Assert.AreEqual(2, pins.Count()); Assert.AreEqual(2, pins.ToArray()[0]); Assert.AreEqual(7, pins.ToArray()[1]); }
public void diffTest() { var pins1 = new ProcessorPins(); pins1.Set(2, true); pins1.Set(7, true); var pins2 = new ProcessorPins(); pins2.Set(2, true); var pins = pins2.Diff(pins1); Assert.AreEqual(pins1.Count, pins.Count); Assert.AreEqual(true, pins.Get(7)); Assert.AreEqual(false, pins.Get(2)); }
public void compareNETest() { var pins1 = new ProcessorPins(); var pins2 = new ProcessorPins(); pins2.Set(0, true); Assert.AreNotEqual(pins1, pins2); pins1.Set(1, true); Assert.AreNotEqual(pins1, pins2); }