#include "QueueCB.h"
#include <iostream>
#include <cassert>
using namespace std;
#include "memory_leak.h"

int main(int argc, char* argv[])
{
    int i=0;
    int data; 
    QueueCB queue; 

    set_initial_leak_test();

    queue.init(); 

    cout << "Fill the queue with data ...   ";

    while (queue.put(i))
       cout << i++ << " ";

    assert(queue.isFull());

    cout << endl << "Extract data from the queue... ";

    while (queue.get(&data))
       cout << data << " "; 

    cout << endl;

    assert(queue.isEmpty());

//    queue.destroy();

    system("pause");
    return 0;
} 
