]> git.donarmstrong.com Git - lilypond.git/blob - flower/test/pqtest.cc
release: 0.0.53
[lilypond.git] / flower / test / pqtest.cc
1 #include "flower-test.hh"
2 #include "pqueue.hh"
3 #include <stdlib.h>
4
5 int compare(int i, int j)
6 {
7     return i-j;
8 }
9
10 void
11 pqtest()
12 {
13     PQueue<int> pq;
14
15     for (int i=0; i < 10; i++) {
16         int r = rand()/10000;
17         pq.insert(r);
18         cout << "adding: " << r<< endl;
19     }
20     while (pq.size()) {
21         cout << "getting : "<< flush;
22         cout << pq.get() << "\n";
23     }
24 }
25
26 ADD_TEST(pqtest);