Ejemplo n.º 1
0
class TestPcb(unittest.TestCase):
    

    def setUp(self):
        self.pcb = Pcb(10,14)
        self.pcb.increase()

    def test_PID_was_correctly_initialized(self):
        self.assertEqual(self.pcb.getPid(), 10, "THE PID is not that he belongs to the pcb")
        
    def test_increase_program_counter(self):
        self.assertEqual(self.pcb.getPC(), 15, "the next address of the PC is incorrect")
Ejemplo n.º 2
0
 def setUp(self):
     self.pcb = Pcb()
     self.cpu = Cpu(Memory())
Ejemplo n.º 3
0
 def setUp(self):
     self.pcb = Pcb(10,14)
     self.pcb.increase()