Exemple #1
0
        public void TestAcknoledgeInterruptionWhenNoRequests()
        {
            InterruptionController controller = new InterruptionController();
            byte noAckIrq = 255;

            Assert.AreEqual(noAckIrq, controller.AcknowledgeInterruption());
        }
Exemple #2
0
        public void TestAcknolegdeInterruptionAfterMakeInterruption()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            Assert.AreEqual(irq, controller.AcknowledgeInterruption());
        }
Exemple #3
0
        public void TestHasNoInterruptionAfterAcknowledgeWhenSingle()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            controller.AcknowledgeInterruption();
            Assert.IsFalse(controller.HasInterruptionRequests());
        }
Exemple #4
0
        public void TestHasInterruptionAfterAcknowledgeWhenMultiple()
        {
            InterruptionController controller = new InterruptionController();
            byte irq  = 3;
            byte irq2 = 4;

            controller.MakeInterruption(irq);
            controller.MakeInterruption(irq2);
            controller.AcknowledgeInterruption();
            Assert.IsTrue(controller.HasInterruptionRequests());
        }