summaryrefslogtreecommitdiff
path: root/src/tests/heap.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 02:14:08 +0000
commitf5aca1a1b402bd7ebc944dc6e6fe65828d863365 (patch)
tree4a0fdd8e166d5c4b03543279d332b9a858ef62df /src/tests/heap.cpp
parent10c557562e1d67c55314c212371ea9cb7f802863 (diff)
downloadlibbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.gz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.bz2
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.tar.xz
libbu++-f5aca1a1b402bd7ebc944dc6e6fe65828d863365.zip
Bu::FString is now String, and there's a shell script to fix any other programs
that were using fstring, I hope.
Diffstat (limited to '')
-rw-r--r--src/tests/heap.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tests/heap.cpp b/src/tests/heap.cpp
index 7538936..3576f25 100644
--- a/src/tests/heap.cpp
+++ b/src/tests/heap.cpp
@@ -10,7 +10,7 @@
10 10
11#include "bu/formatter.h" 11#include "bu/formatter.h"
12#include "bu/heap.h" 12#include "bu/heap.h"
13#include "bu/fstring.h" 13#include "bu/string.h"
14#include "bu/file.h" 14#include "bu/file.h"
15 15
16typedef struct num 16typedef struct num
@@ -38,15 +38,15 @@ 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::String> &h, int j )
42{ 42{
43// return; 43// return;
44 Bu::FString sFName; 44 Bu::String 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 f << "Graph step: " << j << ", total size: " << h.getSize() << f.nl; 48 f << "Graph step: " << j << ", total size: " << h.getSize() << f.nl;
49 for( Bu::Heap<Bu::FString>::iterator i = h.begin(); i; i++ ) 49 for( Bu::Heap<Bu::String>::iterator i = h.begin(); i; i++ )
50 { 50 {
51 f << *i << f.nl; 51 f << *i << f.nl;
52 } 52 }
@@ -73,7 +73,7 @@ int main()
73 } 73 }
74 printf("\n"); 74 printf("\n");
75*/ 75*/
76 Bu::Heap<Bu::FString> hStr; 76 Bu::Heap<Bu::String> hStr;
77 int j = 0; 77 int j = 0;
78 78
79 hStr.enqueue("George"); 79 hStr.enqueue("George");
@@ -100,7 +100,7 @@ int main()
100 } 100 }
101 printf("\n"); 101 printf("\n");
102 102
103 Bu::List<Bu::FString> lStr; 103 Bu::List<Bu::String> lStr;
104 104
105 lStr.insertSorted("George"); 105 lStr.insertSorted("George");
106 lStr.insertSorted("George"); 106 lStr.insertSorted("George");
@@ -110,7 +110,7 @@ int main()
110 lStr.insertSorted("Brianna"); 110 lStr.insertSorted("Brianna");
111 lStr.insertSorted("Kate"); 111 lStr.insertSorted("Kate");
112 lStr.insertSorted("Soggy"); 112 lStr.insertSorted("Soggy");
113 for( Bu::List<Bu::FString>::iterator i = lStr.begin(); i; i++ ) 113 for( Bu::List<Bu::String>::iterator i = lStr.begin(); i; i++ )
114 { 114 {
115 printf("\"%s\" ", (*i).getStr() ); 115 printf("\"%s\" ", (*i).getStr() );
116 } 116 }