/*************************************************************************** This is part of the evolver toolkit for exploring genetic progamming. Copyright (C) 1996 Benjamin Bennett and Yeasah G. Pell This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Contact information: Benjamin Bennett and Yeasah G. Pell *************************************************************************/ /* test suite for the generic classes */ #include #include "queue.H" int main(int argc, char* argv[]) { int i; GQueue q, n; int *p; for (i=0; i<10; i++) { p = new int(i); q.Add(p); } while (q.GetSize() > 5) { p = q.Pop(); cout << *p << " " << endl; } n = q; q.DeleteQueue(); while (n.GetSize() > 0) { p = n.Pop(); cout << *p << " " << endl; } cout << endl; return 0; }