aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-11-18 21:22:54 +0000
committerMike Buland <eichlan@xagasoft.com>2009-11-18 21:22:54 +0000
commit92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e (patch)
tree1211ddf7e5d1034e5a981df8231590625a5eb73b /src/tests
parent509d136e9adb60c56369565b9545e613cac3678e (diff)
downloadlibbu++-92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e.tar.gz
libbu++-92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e.tar.bz2
libbu++-92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e.tar.xz
libbu++-92fef73aa43f48e01c5c2e884cfd1e6706a3ce3e.zip
Hey, fixed the problems in heap. It should now work properly no matter what the
data or order etc.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/heap.cpp7
-rw-r--r--src/tests/listsort.cpp12
2 files changed, 16 insertions, 3 deletions
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
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 Bu::FString sFName; 44 Bu::FString sFName;
44 sFName.format("graph-step-%02d.dot", j ); 45 sFName.format("graph-step-%02d.dot", j );
45 Bu::File fOut( sFName, Bu::File::WriteNew ); 46 Bu::File fOut( sFName, Bu::File::WriteNew );
46 Bu::Formatter f( Bu::File ); 47 Bu::Formatter f( fOut );
47 //h.print( f ); 48// h.print( f );
48} 49}
49 50
50int main() 51int 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;
6 6
7int main() 7int main()
8{ 8{
9 /*
10 List<int> il;
11 il.append( 5 );
12 il.append( 12 );
13 il.append( 0 );
14 il.append( 7 );
15 il.append( 3 );
16 il.append( 5 );
17 Bu::__basicLTCmp<int> cmp;
18 il.sortI( cmp );
19 */
20
9 FString a("Soggy"), b("Sam"); 21 FString a("Soggy"), b("Sam");
10 22
11 if( a < b ) 23 if( a < b )