formatting source-code for d7af6fdc8c

This commit is contained in:
github-actions
2020-05-29 23:26:30 +00:00
parent edb3d51ec2
commit 7ad1f171c1
176 changed files with 5342 additions and 4288 deletions

View File

@@ -1,22 +1,25 @@
#include <iostream>
#include <string>
#include "queue.h"
#include "queue.cpp"
#include "queue.h"
using namespace std;
int main()
{
queue<string> q;
cout << "---------------------- Test construct ----------------------" << endl;
cout << "---------------------- Test construct ----------------------"
<< endl;
q.display();
cout << "---------------------- Test isEmptyQueue ----------------------" << endl;
if(q.isEmptyQueue())
cout << "PASS" <<endl;
cout << "---------------------- Test isEmptyQueue ----------------------"
<< endl;
if (q.isEmptyQueue())
cout << "PASS" << endl;
else
cout << "FAIL" <<endl;
cout << "---------------------- Test enQueue ----------------------" << endl;
cout << "After Hai, Jeff, Tom, Jkingston go into queue: "<<endl;
cout << "FAIL" << endl;
cout << "---------------------- Test enQueue ----------------------"
<< endl;
cout << "After Hai, Jeff, Tom, Jkingston go into queue: " << endl;
q.enQueue("Hai");
q.enQueue("Jeff");
q.enQueue("Tom");
@@ -25,14 +28,15 @@ int main()
cout << "---------------------- Test front ----------------------" << endl;
string value = q.front();
if (value == "Hai")
cout << "PASS" <<endl;
cout << "PASS" << endl;
else
cout << "FAIL" <<endl;
cout << "---------------------- Test deQueue ----------------------" << endl;
cout << "FAIL" << endl;
cout << "---------------------- Test deQueue ----------------------"
<< endl;
q.display();
q.deQueue();
q.deQueue();
cout << "After Hai, Jeff left the queue: "<< endl;
cout << "After Hai, Jeff left the queue: " << endl;
q.display();
return 0;
}