diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:09:04 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:09:04 +0000 |
commit | 393f1b414746a7f1977971dd7659dd2b47092b11 (patch) | |
tree | 81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/tests/heap.cpp | |
parent | c259f95bd0e58b247940a339bb9b4b401b4e9438 (diff) | |
parent | 7e25a863325dc3e9762397e700030969e093b087 (diff) | |
download | libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2 libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip |
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically
update your projects.
Diffstat (limited to 'src/tests/heap.cpp')
-rw-r--r-- | src/tests/heap.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/heap.cpp b/src/tests/heap.cpp index 7538936..14da55a 100644 --- a/src/tests/heap.cpp +++ b/src/tests/heap.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2010 Xagasoft, All rights reserved. | 2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. |
3 | * | 3 | * |
4 | * This file is part of the libbu++ library and is released under the | 4 | * This file is part of the libbu++ library and is released under the |
5 | * terms of the license contained in the file LICENSE. | 5 | * terms of the license contained in the file LICENSE. |
@@ -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 | ||
16 | typedef struct num | 16 | typedef struct num |
@@ -38,15 +38,15 @@ typedef struct num | |||
38 | } | 38 | } |
39 | } num; | 39 | } num; |
40 | 40 | ||
41 | void printHeap( Bu::Heap<Bu::FString> &h, int j ) | 41 | void 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 | } |