#include <cassert>
#include <cstdlib>
#include <cstdio>
#include "BinarySearchTree.h"
#include "memory_leak.h"

int main()
{
    int data[] = {10, 20, 5, 8, 30, 15, 1, 18};
    int ndata = sizeof(data)/sizeof(int);
    int i;
    BinarySearchTree bst;
    set_initial_leak_test();

    for (i=0; i<ndata; i++)
        bst.insert(data[i]);

    printf("In order listing: ");
    bst.print_inorder();
    printf("\n");
    fflush(stdout);

    assert(bst.find(15));

    assert(!bst.find(11));

//    bst.freeMem();
    system("pause");
    return 0;
}
