-
Notifications
You must be signed in to change notification settings - Fork 0
/
testPriorityQueue.c
41 lines (38 loc) · 1.08 KB
/
testPriorityQueue.c
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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: testPQ.c
* Author: Cox Family
*
* Created on January 8, 2016, 1:34 PM
*/
#include <stdio.h>
#include <stdlib.h>
#include "PCB.h"
#include "fifo_queue.h"
#include "PriorityQueue.h"
/*
*
*/
int testPQ() {
printf("\nTestPQ started\n");
PCB pcb = {new, 1, 23, 0, 2, 23, 23, 4, 5};
//toString(&pcb);
fifo_queue *thePQ = createPriorityQueue();
printf("Testing priority queue toString on empty\n");
PriorityQueuetoString(thePQ);
printf("Testing priority queue addPCB\n");
addPCB(&pcb, thePQ);
printf("Testing priority queue toString\n");
PriorityQueuetoString(thePQ);
printf("Testing that I didn't mess up any queues with the last toString\n");
PriorityQueuetoString(thePQ);
printf("Testing GetNext \n");
toString(GetNext(thePQ));
printf("Testing GetNext on Empty PQ\n");
toString(GetNext(thePQ));
return (EXIT_SUCCESS);
}