lilypond-1.3.0
[lilypond.git] / flowertest / pqtest.cc
blobea28bcb0fa27a380e9dd6759e97275d7ec118ff0
1 #include "flower-test.hh"
2 #include "pqueue.hh"
3 #include <stdlib.h>
5 int compare (int i, int j)
7 return i-j;
10 void
11 pqtest ()
13 PQueue<int> pq;
15 for (int i=0; i < 10; i++) {
16 int r = rand ()/10000;
17 pq.insert (r);
18 cout << "adding: " << r<< endl;
20 while (pq.size ()) {
21 cout << "getting : "<< flush;
22 cout << pq.get () << "\n";
26 ADD_TEST (pqtest);