-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
41 lines (33 loc) · 1.01 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from implementations.second_chance import TestSuitSecondChance
from implementations.fifo import TestSuitFifo
from implementations.nru import TestSuitNRU
from implementations.lru import TestSuitLRU
from utils.terminal_colors import bcolors, Terminal
def get_pages():
file = open("./tests/test.txt", "r")
pages = []
for line in file:
pages = line.split(', ')
file.close()
return pages
referenced_pages = get_pages()
Terminal.print(
bcolors.OKBLUE,
"-----------------------------FIFO------------------------------"
)
TestSuitFifo.test(referenced_pages)
Terminal.print(
bcolors.OKCYAN,
"----------------------------- SECOND CHANCE---------------------"
)
TestSuitSecondChance.test(referenced_pages)
Terminal.print(
bcolors.OKGREEN,
"----------------------------- NRU-------------------------------"
)
TestSuitNRU().test(referenced_pages)
Terminal.print(
bcolors.OKBLUE,
"----------------------------- LRU-------------------------------"
)
TestSuitLRU.test(referenced_pages)