DEADSOFTWARE

moved tools to separate directory; moved "mapdef.txt" to separate directory
[d2df-sdl.git] / src / shared / tests / test_heap.dpr
1 {$INCLUDE ../a_modes.inc}
2 uses
3 SysUtils,
4 binheap in '../binheap.pas';
7 var
8 heap: TBinaryHeapInt;
9 begin
10 writeln('================');
11 heap := binHeapNewIntLess();
12 heap.insert(666);
13 heap.insert(42);
14 heap.insert(69);
15 heap.insert(-666);
16 heap.insert(8);
18 while (heap.count > 0) do
19 begin
20 writeln(heap.front);
21 heap.popFront();
22 end;
24 heap.Free();
26 writeln('================');
27 heap := binHeapNewIntGreat();
28 heap.insert(666);
29 heap.insert(42);
30 heap.insert(69);
31 heap.insert(-666);
32 heap.insert(8);
34 while (heap.count > 0) do
35 begin
36 writeln(heap.front);
37 heap.popFront();
38 end;
40 heap.Free();
41 end.