-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc_test.cpp
38 lines (34 loc) · 1010 Bytes
/
doc_test.cpp
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
#include <stdio.h>
#include <iostream>
using namespace std;
#include "Document.h"
#include "llp.h"
int main ()
{
Double_list *docs = new Double_list;
Document *billy = new Document ("a" , "8");
// you need to throw an error if the priority is outside of the range
Document *c = new Document("c", "2");
Document *lp = new Document("b", "1");
docs->doc_add(lp);
docs->doc_add (billy);
docs->doc_add(c);
// docs->print();
// cout << "\nTest Find" << endl;
// Document* test = docs->retrieve("a");
// Document* tr = docs->retrieve("zed");
// cout << *test << endl;
docs->print();
// cout << "\ndeq test\n" << *docs->dequeue() << endl;
// docs->print();
// //seg fault on find
// //cout << tr << endl;
// cout << "\nPop Test\n" << *docs->pop() << endl;
// cout << "\nPop Test\n" << *docs->pop() << endl;
// Document *by = new Document ("d", "1");
// Document *hurl = new Document ("e", "3");
// docs->doc_add (by);
// docs->doc_add (hurl);
// docs->print();
return 0;
}