/*
 * This file: queue_test.cpp
 * 
 * This file contains the implementation of test program
 * for the queue container class.
 */

#include <iostream>
#include <string>
#include "queue.h"
#include "Name.h"

using namespace std;
using namespace uprm_icom4035;

int main() {
  queue<Name> Q;
  Name name;
  
  if (!Q.is_empty()){
    cout << "Q is not empty. ???" << endl;
  }
  else {
    cout << "Q is empty" << endl;
  }
  
  name = Name("Tom", "Smith");
  cout << "Adding name: " << name << endl;
  Q.enqueue(name);

  name = Name("Joe", "Lee");
  cout << "Adding name: " << name << endl;
  Q.enqueue(name);

  name = Name("Tim", "Zell");
  cout << "Adding name: " << name << endl;
  Q.enqueue(name);
  
  cout << "Print queue: " << endl;
  Q.print_queue(cout);
  
  cout << "Calling dequeue() " << endl;
  Q.dequeue();
  
  cout << "Print queue: " << endl;
  Q.print_queue(cout);
  
  queue<Name> Q2(Q);
  cout << "Queue 2: " << endl;
  Q2.print_queue(cout);
  
  cout << "Queue length: ";
  cout << Q.size() << endl;
  
  cout << "Testing done!" << endl;
  
}
