aboutsummaryrefslogtreecommitdiff
path: root/src/tests/heap.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-10-06 07:01:28 +0000
committerMike Buland <eichlan@xagasoft.com>2010-10-06 07:01:28 +0000
commit313e28df2a8776c82f5493aef6fe44ad40f1935a (patch)
tree219d5ff889b85773a6670fdff28c2043b14a1f09 /src/tests/heap.cpp
parent0bb8c5962e93fae4a2542d57efe8e87d30d8f0fb (diff)
downloadlibbu++-313e28df2a8776c82f5493aef6fe44ad40f1935a.tar.gz
libbu++-313e28df2a8776c82f5493aef6fe44ad40f1935a.tar.bz2
libbu++-313e28df2a8776c82f5493aef6fe44ad40f1935a.tar.xz
libbu++-313e28df2a8776c82f5493aef6fe44ad40f1935a.zip
Changed the Bu::Heap to allow iteration, and added lots of cool features to
Bu::MiniCron.
Diffstat (limited to 'src/tests/heap.cpp')
-rw-r--r--src/tests/heap.cpp11
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
41void printHeap( Bu::Heap<Bu::FString> &/*h*/, int j ) 41void 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
51int main() 56int main()