From 92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 18 Nov 2009 21:22:54 +0000 Subject: Hey, fixed the problems in heap. It should now work properly no matter what the data or order etc. --- src/tests/heap.cpp | 7 ++++--- src/tests/listsort.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/tests') diff --git a/src/tests/heap.cpp b/src/tests/heap.cpp index ae130ec..b1f510a 100644 --- a/src/tests/heap.cpp +++ b/src/tests/heap.cpp @@ -38,13 +38,14 @@ typedef struct num } } num; -void printHeap( Bu::Heap &h, int j ) +void printHeap( Bu::Heap &/*h*/, int j ) { + return; Bu::FString sFName; sFName.format("graph-step-%02d.dot", j ); Bu::File fOut( sFName, Bu::File::WriteNew ); - Bu::Formatter f( Bu::File ); - //h.print( f ); + Bu::Formatter f( fOut ); +// h.print( f ); } int main() diff --git a/src/tests/listsort.cpp b/src/tests/listsort.cpp index f9236e6..09c0273 100644 --- a/src/tests/listsort.cpp +++ b/src/tests/listsort.cpp @@ -6,6 +6,18 @@ using namespace Bu; int main() { + /* + List il; + il.append( 5 ); + il.append( 12 ); + il.append( 0 ); + il.append( 7 ); + il.append( 3 ); + il.append( 5 ); + Bu::__basicLTCmp cmp; + il.sortI( cmp ); + */ + FString a("Soggy"), b("Sam"); if( a < b ) -- cgit v1.2.3