diff options
Diffstat (limited to 'heap.c')
| -rw-r--r-- | heap.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -165,12 +165,14 @@ test_pq(void) | |||
| 165 | 165 | ||
| 166 | pq_init(pq); | 166 | pq_init(pq); |
| 167 | 167 | ||
| 168 | for ( int i = 0; i != 10; ++i ) | 168 | for ( int i = 0; i != 10; ++i ) { |
| 169 | pq_push(pq, rand()); | 169 | pq_push(pq, rand()); |
| 170 | } | ||
| 170 | 171 | ||
| 171 | T data; | 172 | T data; |
| 172 | while ( pq_pop(pq, &data) ) | 173 | while ( pq_pop(pq, &data) ) { |
| 173 | printf("%d\n", data); | 174 | printf("%d\n", data); |
| 175 | } | ||
| 174 | } | 176 | } |
| 175 | 177 | ||
| 176 | int | 178 | int |
