diff options
Diffstat (limited to 'src/tests/heap.cpp')
| -rw-r--r-- | src/tests/heap.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tests/heap.cpp b/src/tests/heap.cpp index 6f68598..7538936 100644 --- a/src/tests/heap.cpp +++ b/src/tests/heap.cpp | |||
| @@ -38,14 +38,19 @@ typedef struct num | |||
| 38 | } | 38 | } |
| 39 | } num; | 39 | } num; |
| 40 | 40 | ||
| 41 | void printHeap( Bu::Heap<Bu::FString> &/*h*/, int j ) | 41 | void printHeap( Bu::Heap<Bu::FString> &h, int j ) |
| 42 | { | 42 | { |
| 43 | return; | 43 | // return; |
| 44 | Bu::FString sFName; | 44 | Bu::FString sFName; |
| 45 | sFName.format("graph-step-%02d.dot", j ); | 45 | sFName.format("graph-step-%02d.dot", j ); |
| 46 | Bu::File fOut( sFName, Bu::File::WriteNew ); | 46 | Bu::File fOut( sFName, Bu::File::WriteNew ); |
| 47 | Bu::Formatter f( fOut ); | 47 | Bu::Formatter f( fOut ); |
| 48 | // h.print( f ); | 48 | f << "Graph step: " << j << ", total size: " << h.getSize() << f.nl; |
| 49 | for( Bu::Heap<Bu::FString>::iterator i = h.begin(); i; i++ ) | ||
| 50 | { | ||
| 51 | f << *i << f.nl; | ||
| 52 | } | ||
| 53 | f << f.nl; | ||
| 49 | } | 54 | } |
| 50 | 55 | ||
| 51 | int main() | 56 | int main() |
