コード例 #1
0
        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]);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
        }