예제 #1
0
        public void TestHasInterruptionAfterMakeInterruption()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            Assert.IsTrue(controller.HasInterruptionRequests());
        }
예제 #2
0
        public void TestHasNoInterruptionAfterClear()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            controller.Clear();
            Assert.IsFalse(controller.HasInterruptionRequests());
        }
예제 #3
0
        public void TestClearInterruptionsClearOnlyCurrent()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            controller.ClearInterruptions();
            Assert.IsTrue(controller.HasInterruptionRequests());
        }
예제 #4
0
        public void TestHasNoInterruptionAfterAcknowledgeWhenSingle()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            controller.AcknowledgeInterruption();
            Assert.IsFalse(controller.HasInterruptionRequests());
        }
예제 #5
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());
        }
예제 #6
0
        public void TestHasNoInterruptionByDefault()
        {
            InterruptionController controller = new InterruptionController();

            Assert.IsFalse(controller.HasInterruptionRequests());
        }