Ejemplo n.º 1
0
        public void TestHasInterruptionAfterMakeInterruption()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            Assert.IsTrue(controller.HasInterruptionRequests());
        }
Ejemplo n.º 2
0
        public void TestHasNoInterruptionAfterClear()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            controller.Clear();
            Assert.IsFalse(controller.HasInterruptionRequests());
        }
Ejemplo n.º 3
0
        public void TestClearInterruptionsClearOnlyCurrent()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

            controller.MakeInterruption(irq);
            controller.ClearInterruptions();
            Assert.IsTrue(controller.HasInterruptionRequests());
        }
Ejemplo n.º 4
0
        public void TestHasNoInterruptionAfterAcknowledgeWhenSingle()
        {
            InterruptionController controller = new InterruptionController();
            byte irq = 3;

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

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