aboutsummaryrefslogtreecommitdiff
path: root/src/tests/heap.cpp
diff options
context:
space:
mode:
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 }