aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/unit/archive.unit14
-rw-r--r--src/unit/array.unit2
-rw-r--r--src/unit/buffer.unit4
-rw-r--r--src/unit/fstring.unit134
-rw-r--r--src/unit/hash.unit10
-rw-r--r--src/unit/list.unit2
-rw-r--r--src/unit/myriad.unit20
-rw-r--r--src/unit/queuebuf.unit12
-rw-r--r--src/unit/taf.unit6
-rw-r--r--src/unit/xml.unit4
-rw-r--r--src/unitsuite.cpp8
-rw-r--r--src/unitsuite.h24
12 files changed, 120 insertions, 120 deletions
diff --git a/src/unit/archive.unit b/src/unit/archive.unit
index a7f2640..07e5e11 100644
--- a/src/unit/archive.unit
+++ b/src/unit/archive.unit
@@ -105,7 +105,7 @@ suite Archive
105 MemBuf mb; 105 MemBuf mb;
106 { 106 {
107 Archive ar( mb, Archive::save ); 107 Archive ar( mb, Archive::save );
108 FString sStr("This is a test string."); 108 String sStr("This is a test string.");
109 List<int> lList; 109 List<int> lList;
110 lList.append( 10 ); 110 lList.append( 10 );
111 lList.append( 20 ); 111 lList.append( 20 );
@@ -118,7 +118,7 @@ suite Archive
118 mb.setPos( 0 ); 118 mb.setPos( 0 );
119 { 119 {
120 Archive ar( mb, Archive::load ); 120 Archive ar( mb, Archive::load );
121 FString sStr; 121 String sStr;
122 List<int> lList; 122 List<int> lList;
123 ar >> sStr; 123 ar >> sStr;
124 ar >> lList; 124 ar >> lList;
@@ -138,7 +138,7 @@ suite Archive
138 MemBuf mb; 138 MemBuf mb;
139 { 139 {
140 Archive ar( mb, Archive::save ); 140 Archive ar( mb, Archive::save );
141 FString sStr("This is a test string."); 141 String sStr("This is a test string.");
142 Array<int> lArray; 142 Array<int> lArray;
143 lArray.append( 10 ); 143 lArray.append( 10 );
144 lArray.append( 20 ); 144 lArray.append( 20 );
@@ -151,7 +151,7 @@ suite Archive
151 mb.setPos( 0 ); 151 mb.setPos( 0 );
152 { 152 {
153 Archive ar( mb, Archive::load ); 153 Archive ar( mb, Archive::load );
154 FString sStr; 154 String sStr;
155 Array<int> lArray; 155 Array<int> lArray;
156 ar >> sStr; 156 ar >> sStr;
157 ar >> lArray; 157 ar >> lArray;
@@ -171,7 +171,7 @@ suite Archive
171 MemBuf mb; 171 MemBuf mb;
172 { 172 {
173 Archive ar( mb, Archive::save ); 173 Archive ar( mb, Archive::save );
174 Array<FString> lArray; 174 Array<String> lArray;
175 lArray.append( "10" ); 175 lArray.append( "10" );
176 lArray.append( "20" ); 176 lArray.append( "20" );
177 lArray.append( "30" ); 177 lArray.append( "30" );
@@ -182,10 +182,10 @@ suite Archive
182 mb.setPos( 0 ); 182 mb.setPos( 0 );
183 { 183 {
184 Archive ar( mb, Archive::load ); 184 Archive ar( mb, Archive::load );
185 Array<FString> lArray; 185 Array<String> lArray;
186 ar >> lArray; 186 ar >> lArray;
187 unitTest( lArray.getSize() == 4 ); 187 unitTest( lArray.getSize() == 4 );
188 Array<FString>::iterator i = lArray.begin(); 188 Array<String>::iterator i = lArray.begin();
189 unitTest( *i == "10" ); i++; 189 unitTest( *i == "10" ); i++;
190 unitTest( *i == "20" ); i++; 190 unitTest( *i == "20" ); i++;
191 unitTest( *i == "30" ); i++; 191 unitTest( *i == "30" ); i++;
diff --git a/src/unit/array.unit b/src/unit/array.unit
index f3fdeda..4dc75d8 100644
--- a/src/unit/array.unit
+++ b/src/unit/array.unit
@@ -55,7 +55,7 @@ suite Array
55 55
56 test copy 56 test copy
57 { 57 {
58 typedef Bu::Hash<Bu::FString, Bu::FString> StrHash; 58 typedef Bu::Hash<Bu::String, Bu::String> StrHash;
59 typedef Bu::Array<StrHash> StrHashArray; 59 typedef Bu::Array<StrHash> StrHashArray;
60 60
61 StrHash h1; 61 StrHash h1;
diff --git a/src/unit/buffer.unit b/src/unit/buffer.unit
index 8ed1ec5..2a8f846 100644
--- a/src/unit/buffer.unit
+++ b/src/unit/buffer.unit
@@ -14,12 +14,12 @@ suite Buffer
14{ 14{
15 test emptyFile 15 test emptyFile
16 { 16 {
17 Bu::FString sTmp("empty-XXXXXX"); 17 Bu::String sTmp("empty-XXXXXX");
18 Bu::File fEmpty = tempFile(sTmp); 18 Bu::File fEmpty = tempFile(sTmp);
19 Bu::Buffer buf( fEmpty ); 19 Bu::Buffer buf( fEmpty );
20 20
21 unitTest( buf.isEos() == false ); 21 unitTest( buf.isEos() == false );
22 Bu::FString sLine = buf.readLine(); 22 Bu::String sLine = buf.readLine();
23 unitTest( sLine == "" ); 23 unitTest( sLine == "" );
24 unitTest( fEmpty.isEos() == true ); 24 unitTest( fEmpty.isEos() == true );
25 unitTest( buf.isEos() == true ); 25 unitTest( buf.isEos() == true );
diff --git a/src/unit/fstring.unit b/src/unit/fstring.unit
index c6d7414..d282052 100644
--- a/src/unit/fstring.unit
+++ b/src/unit/fstring.unit
@@ -6,29 +6,29 @@
6 * terms of the license contained in the file LICENSE. 6 * terms of the license contained in the file LICENSE.
7 */ 7 */
8 8
9#include "bu/fstring.h" 9#include "bu/string.h"
10 10
11#include <dirent.h> 11#include <dirent.h>
12 12
13suite FString 13suite String
14{ 14{
15 test compare1 15 test compare1
16 { 16 {
17 Bu::FString b("Bob"); 17 Bu::String b("Bob");
18 unitTest( !(b == "Bobo") ); 18 unitTest( !(b == "Bobo") );
19 unitTest( b == "Bob" ); 19 unitTest( b == "Bob" );
20 } 20 }
21 21
22 test compare2 22 test compare2
23 { 23 {
24 Bu::FString b("Bobo"); 24 Bu::String b("Bobo");
25 unitTest( !(b == "Bob") ); 25 unitTest( !(b == "Bob") );
26 unitTest( b == "Bobo" ); 26 unitTest( b == "Bobo" );
27 } 27 }
28 28
29 test appendSingle 29 test appendSingle
30 { 30 {
31 Bu::FString b; 31 Bu::String b;
32 for( char l = 'a'; l < 'g'; l++ ) 32 for( char l = 'a'; l < 'g'; l++ )
33 b += l; 33 b += l;
34 unitTest( b == "abcdef" ); 34 unitTest( b == "abcdef" );
@@ -37,8 +37,8 @@ suite FString
37 37
38 test shared1 38 test shared1
39 { 39 {
40 Bu::FString a("Hey there"); 40 Bu::String a("Hey there");
41 Bu::FString b( a ); 41 Bu::String b( a );
42 unitTest( a.getConstStr() == b.getConstStr() ); 42 unitTest( a.getConstStr() == b.getConstStr() );
43 b += " guy"; 43 b += " guy";
44 unitTest( a.getConstStr() != b.getConstStr() ); 44 unitTest( a.getConstStr() != b.getConstStr() );
@@ -48,7 +48,7 @@ suite FString
48 48
49 test insert 49 test insert
50 { 50 {
51 Bu::FString a("abcd"); 51 Bu::String a("abcd");
52 a.insert( 2, "-!-", 3 ); 52 a.insert( 2, "-!-", 3 );
53 unitTest( a == "ab-!-cd" ); 53 unitTest( a == "ab-!-cd" );
54 54
@@ -67,7 +67,7 @@ suite FString
67 67
68 test remove 68 test remove
69 { 69 {
70 Bu::FString a("abHEYcd"); 70 Bu::String a("abHEYcd");
71 a.remove( 2, 3 ); 71 a.remove( 2, 3 );
72 unitTest( a == "abcd" ); 72 unitTest( a == "abcd" );
73 a.remove( 2, 5 ); 73 a.remove( 2, 5 );
@@ -79,42 +79,42 @@ suite FString
79 79
80 test add1 80 test add1
81 { 81 {
82 Bu::FString a("hi there"); 82 Bu::String a("hi there");
83 Bu::FString b(", yeah!"); 83 Bu::String b(", yeah!");
84 Bu::FString c = a + b; 84 Bu::String c = a + b;
85 85
86 unitTest( c == "hi there, yeah!" ); 86 unitTest( c == "hi there, yeah!" );
87 } 87 }
88 88
89 test add2 89 test add2
90 { 90 {
91 Bu::FString a("hi there"); 91 Bu::String a("hi there");
92 Bu::FString c = a + ", yeah!"; 92 Bu::String c = a + ", yeah!";
93 93
94 unitTest( c == "hi there, yeah!" ); 94 unitTest( c == "hi there, yeah!" );
95 } 95 }
96 96
97 test add3 97 test add3
98 { 98 {
99 Bu::FString a("hi there"); 99 Bu::String a("hi there");
100 Bu::FString b(", yeah!"); 100 Bu::String b(", yeah!");
101 Bu::FString c = a + ", Mr. Man" + b; 101 Bu::String c = a + ", Mr. Man" + b;
102 102
103 unitTest( c == "hi there, Mr. Man, yeah!" ); 103 unitTest( c == "hi there, Mr. Man, yeah!" );
104 } 104 }
105 105
106 test add4 106 test add4
107 { 107 {
108 Bu::FString b(", yeah!"); 108 Bu::String b(", yeah!");
109 Bu::FString c = "hi there" + b; 109 Bu::String c = "hi there" + b;
110 110
111 unitTest( c == "hi there, yeah!" ); 111 unitTest( c == "hi there, yeah!" );
112 } 112 }
113 113
114 test add5 114 test add5
115 { 115 {
116 Bu::FString b; 116 Bu::String b;
117 Bu::FString c = "sup?"; 117 Bu::String c = "sup?";
118 b += "hey, " + c; 118 b += "hey, " + c;
119 119
120 unitTest( b == "hey, sup?" ); 120 unitTest( b == "hey, sup?" );
@@ -122,17 +122,17 @@ suite FString
122 122
123 test add6 123 test add6
124 { 124 {
125 Bu::FString a("Hello"); 125 Bu::String a("Hello");
126 char b[256] = {"Dude"}; 126 char b[256] = {"Dude"};
127 Bu::FString c = a + "/" + b; 127 Bu::String c = a + "/" + b;
128 128
129 unitTest( c == "Hello/Dude" ); 129 unitTest( c == "Hello/Dude" );
130 } 130 }
131 131
132 test add7 132 test add7
133 { 133 {
134 const Bu::FString a("hello "); 134 const Bu::String a("hello ");
135 Bu::FString b(" how "); 135 Bu::String b(" how ");
136 unitTest( a == "hello " ); 136 unitTest( a == "hello " );
137 unitTest( a + "dude" == "hello dude" ); 137 unitTest( a + "dude" == "hello dude" );
138 unitTest( a + "dude" + b + "are you?" == "hello dude how are you?" ); 138 unitTest( a + "dude" + b + "are you?" == "hello dude how are you?" );
@@ -140,16 +140,16 @@ suite FString
140 140
141 test subStr1 141 test subStr1
142 { 142 {
143 Bu::FString a("abcdefghijklmnop"); 143 Bu::String a("abcdefghijklmnop");
144 Bu::FString::iterator i = a.find('f'); 144 Bu::String::iterator i = a.find('f');
145 unitTest( a.getSubStr( i, Bu::FString::iterator() ) == "fghijklmnop" ); 145 unitTest( a.getSubStr( i, Bu::String::iterator() ) == "fghijklmnop" );
146 Bu::FString::iterator j = i.find('l'); 146 Bu::String::iterator j = i.find('l');
147 unitTest( a.getSubStr( i, j ) == "fghijk" ); 147 unitTest( a.getSubStr( i, j ) == "fghijk" );
148 } 148 }
149 149
150 test compareSub1 150 test compareSub1
151 { 151 {
152 Bu::FString a("just a string."); 152 Bu::String a("just a string.");
153 unitTest( a.compareSub("a ", 5, 2) == true ); 153 unitTest( a.compareSub("a ", 5, 2) == true );
154 unitTest( a.compareSub("string.aoeu", 7, 11 ) == false ); 154 unitTest( a.compareSub("string.aoeu", 7, 11 ) == false );
155 unitTest( a.compareSub("string.aoeu", 7, 3 ) == true ); 155 unitTest( a.compareSub("string.aoeu", 7, 3 ) == true );
@@ -157,17 +157,17 @@ suite FString
157 157
158 test compareSub2 158 test compareSub2
159 { 159 {
160 Bu::FString a("just a string."); 160 Bu::String a("just a string.");
161 unitTest( a.compareSub(Bu::FString("a "), 5, 2) == true ); 161 unitTest( a.compareSub(Bu::String("a "), 5, 2) == true );
162 unitTest( a.compareSub(Bu::FString("string.aoeu"), 7, 11 ) == false ); 162 unitTest( a.compareSub(Bu::String("string.aoeu"), 7, 11 ) == false );
163 unitTest( a.compareSub(Bu::FString("string.aoeu"), 7, 3 ) == true ); 163 unitTest( a.compareSub(Bu::String("string.aoeu"), 7, 3 ) == true );
164 } 164 }
165 165
166 test iterator1 166 test iterator1
167 { 167 {
168 Bu::FString a("This is a test."); 168 Bu::String a("This is a test.");
169 Bu::FString b; 169 Bu::String b;
170 for( Bu::FString::iterator i = a.begin(); i; i++ ) 170 for( Bu::String::iterator i = a.begin(); i; i++ )
171 { 171 {
172 b += *i; 172 b += *i;
173 } 173 }
@@ -176,10 +176,10 @@ suite FString
176 176
177 test iterator2 177 test iterator2
178 { 178 {
179 Bu::FString a("This is a test."); 179 Bu::String a("This is a test.");
180 Bu::FString b("--This is a test."); 180 Bu::String b("--This is a test.");
181 Bu::FString::iterator ai = a.begin(); 181 Bu::String::iterator ai = a.begin();
182 Bu::FString::iterator bi = b.begin(); 182 Bu::String::iterator bi = b.begin();
183 unitTest( ai.compare( bi ) == false ); 183 unitTest( ai.compare( bi ) == false );
184 unitTest( bi.compare( ai ) == false ); 184 unitTest( bi.compare( ai ) == false );
185 bi++; bi++; 185 bi++; bi++;
@@ -189,10 +189,10 @@ suite FString
189 189
190 test iterator3 190 test iterator3
191 { 191 {
192 Bu::FString a("1234honour"); 192 Bu::String a("1234honour");
193 Bu::FString b("--1234ueje"); 193 Bu::String b("--1234ueje");
194 Bu::FString::iterator ai = a.begin(); 194 Bu::String::iterator ai = a.begin();
195 Bu::FString::iterator bi = b.begin(); 195 Bu::String::iterator bi = b.begin();
196 unitTest( ai.compare( bi, 4 ) == false ); 196 unitTest( ai.compare( bi, 4 ) == false );
197 unitTest( bi.compare( ai, 4 ) == false ); 197 unitTest( bi.compare( ai, 4 ) == false );
198 bi++; bi++; 198 bi++; bi++;
@@ -205,8 +205,8 @@ suite FString
205 205
206 test iterator4 206 test iterator4
207 { 207 {
208 Bu::FString a("1234aoeu"); 208 Bu::String a("1234aoeu");
209 Bu::FString::iterator ai = a.begin(); 209 Bu::String::iterator ai = a.begin();
210 unitTest( ai.compare("1234") == false ); 210 unitTest( ai.compare("1234") == false );
211 unitTest( ai.compare("1234aoeu") == true ); 211 unitTest( ai.compare("1234aoeu") == true );
212 unitTest( ai.compare("1234aoeuee") == false ); 212 unitTest( ai.compare("1234aoeuee") == false );
@@ -214,8 +214,8 @@ suite FString
214 214
215 test iterator5 215 test iterator5
216 { 216 {
217 Bu::FString a("1234aoeu"); 217 Bu::String a("1234aoeu");
218 Bu::FString::iterator ai = a.begin(); 218 Bu::String::iterator ai = a.begin();
219 unitTest( ai.compare("1234", 4) == true ); 219 unitTest( ai.compare("1234", 4) == true );
220 unitTest( ai.compare("1234aoeu", 8) == true ); 220 unitTest( ai.compare("1234aoeu", 8) == true );
221 unitTest( ai.compare("1234aoeuee", 10) == false ); 221 unitTest( ai.compare("1234aoeuee", 10) == false );
@@ -223,9 +223,9 @@ suite FString
223 223
224 test iterator6 224 test iterator6
225 { 225 {
226 Bu::FString a("just ->this part"); 226 Bu::String a("just ->this part");
227 Bu::FString b; 227 Bu::String b;
228 Bu::FString::iterator s = a.begin(); 228 Bu::String::iterator s = a.begin();
229 for(; s; s++ ) 229 for(; s; s++ )
230 { 230 {
231 if( *s == '>' ) 231 if( *s == '>' )
@@ -239,7 +239,7 @@ suite FString
239 239
240 b.append( s ); 240 b.append( s );
241 241
242 Bu::FString c; 242 Bu::String c;
243 c.set( b.begin() ); 243 c.set( b.begin() );
244 244
245 // This is here because the comparison operator used to cause flattening. 245 // This is here because the comparison operator used to cause flattening.
@@ -249,9 +249,9 @@ suite FString
249 249
250 test iterator7 250 test iterator7
251 { 251 {
252 Bu::FString a("just [this] part"); 252 Bu::String a("just [this] part");
253 Bu::FString b; 253 Bu::String b;
254 Bu::FString::iterator s = a.begin(); 254 Bu::String::iterator s = a.begin();
255 for(; s; s++ ) 255 for(; s; s++ )
256 { 256 {
257 if( *s == '[' ) 257 if( *s == '[' )
@@ -260,7 +260,7 @@ suite FString
260 break; 260 break;
261 } 261 }
262 } 262 }
263 Bu::FString::iterator e = s; 263 Bu::String::iterator e = s;
264 for(; e; e++ ) 264 for(; e; e++ )
265 { 265 {
266 if( *e == ']' ) 266 if( *e == ']' )
@@ -273,9 +273,9 @@ suite FString
273 273
274 b.append( s, e ); 274 b.append( s, e );
275 275
276 for( Bu::FString::iterator i = b.begin(); i;) 276 for( Bu::String::iterator i = b.begin(); i;)
277 { 277 {
278 Bu::FString::iterator k = i; 278 Bu::String::iterator k = i;
279 k++; 279 k++;
280 if( !k ) 280 if( !k )
281 { 281 {
@@ -284,12 +284,12 @@ suite FString
284 } 284 }
285 i = k; 285 i = k;
286 } 286 }
287 Bu::FString l; 287 Bu::String l;
288 l.set( b.begin() ); 288 l.set( b.begin() );
289 unitTest( l == "thisthisthisthi" ); 289 unitTest( l == "thisthisthisthi" );
290 for( Bu::FString::iterator i = b.begin(); i;) 290 for( Bu::String::iterator i = b.begin(); i;)
291 { 291 {
292 Bu::FString::iterator k = i; 292 Bu::String::iterator k = i;
293 k++; 293 k++;
294 if( !k ) 294 if( !k )
295 { 295 {
@@ -304,7 +304,7 @@ suite FString
304 304
305 test isSet1 305 test isSet1
306 { 306 {
307 Bu::FString bob; 307 Bu::String bob;
308 308
309 unitTest( bob.isSet() == false ); 309 unitTest( bob.isSet() == false );
310 bob = "something"; 310 bob = "something";
@@ -315,7 +315,7 @@ suite FString
315 315
316 test swap1 316 test swap1
317 { 317 {
318 Bu::FString a, b; 318 Bu::String a, b;
319 a = "Goodbye"; 319 a = "Goodbye";
320 b = "Hello"; 320 b = "Hello";
321 Bu::swap( a, b ); 321 Bu::swap( a, b );
@@ -325,7 +325,7 @@ suite FString
325 325
326 test swap2 326 test swap2
327 { 327 {
328 Bu::FString a, b; 328 Bu::String a, b;
329 a = "Goodbye"; 329 a = "Goodbye";
330 b = "Hello"; 330 b = "Hello";
331 std::swap( a, b ); 331 std::swap( a, b );
@@ -335,14 +335,14 @@ suite FString
335 335
336 test replace1 336 test replace1
337 { 337 {
338 Bu::FString a; 338 Bu::String a;
339 a = "This is a test."; 339 a = "This is a test.";
340 unitTest( a.replace("i", "ooo") == "Thooos ooos a test." ); 340 unitTest( a.replace("i", "ooo") == "Thooos ooos a test." );
341 } 341 }
342 342
343 test coreDerefBug1 343 test coreDerefBug1
344 { 344 {
345 Bu::FString a, b; 345 Bu::String a, b;
346 a = "bob"; 346 a = "bob";
347 a.setSize( 0 ); 347 a.setSize( 0 );
348 b = a; 348 b = a;
diff --git a/src/unit/hash.unit b/src/unit/hash.unit
index 124b074..2c1cf6a 100644
--- a/src/unit/hash.unit
+++ b/src/unit/hash.unit
@@ -6,14 +6,14 @@
6 * terms of the license contained in the file LICENSE. 6 * terms of the license contained in the file LICENSE.
7 */ 7 */
8 8
9#include "bu/fstring.h" 9#include "bu/string.h"
10#include "bu/hash.h" 10#include "bu/hash.h"
11 11
12#include <stdio.h> 12#include <stdio.h>
13 13
14typedef Bu::Hash<Bu::FString, int> StrIntHash; 14typedef Bu::Hash<Bu::String, int> StrIntHash;
15typedef Bu::Hash<Bu::FString, Bu::FString> StrStrHash; 15typedef Bu::Hash<Bu::String, Bu::String> StrStrHash;
16typedef Bu::Hash<int, Bu::FString> IntStrHash; 16typedef Bu::Hash<int, Bu::String> IntStrHash;
17 17
18suite Hash 18suite Hash
19{ 19{
@@ -24,7 +24,7 @@ suite Hash
24 for(int i=1;i<10000;i++) 24 for(int i=1;i<10000;i++)
25 { 25 {
26 sprintf(buf,"%d",i); 26 sprintf(buf,"%d",i);
27 Bu::FString sTmp(buf); 27 Bu::String sTmp(buf);
28 h[sTmp] = i; 28 h[sTmp] = i;
29 unitTest( h.has(sTmp) ); 29 unitTest( h.has(sTmp) );
30 } 30 }
diff --git a/src/unit/list.unit b/src/unit/list.unit
index 66e45b2..24346a3 100644
--- a/src/unit/list.unit
+++ b/src/unit/list.unit
@@ -6,7 +6,7 @@
6 * terms of the license contained in the file LICENSE. 6 * terms of the license contained in the file LICENSE.
7 */ 7 */
8 8
9#include "bu/fstring.h" 9#include "bu/string.h"
10#include "bu/list.h" 10#include "bu/list.h"
11 11
12typedef Bu::List<int> IntList; 12typedef Bu::List<int> IntList;
diff --git a/src/unit/myriad.unit b/src/unit/myriad.unit
index ad8fb5d..5ac80a0 100644
--- a/src/unit/myriad.unit
+++ b/src/unit/myriad.unit
@@ -6,7 +6,7 @@
6 * terms of the license contained in the file LICENSE. 6 * terms of the license contained in the file LICENSE.
7 */ 7 */
8 8
9#include "bu/fstring.h" 9#include "bu/string.h"
10#include "bu/file.h" 10#include "bu/file.h"
11#include "bu/myriad.h" 11#include "bu/myriad.h"
12#include "bu/myriadstream.h" 12#include "bu/myriadstream.h"
@@ -56,7 +56,7 @@ Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const VerifyObject &vo )
56 { 56 {
57 int iRand = random()%128; 57 int iRand = random()%128;
58// ar << iRand; 58// ar << iRand;
59 Bu::FString sDat( iRand ); 59 Bu::String sDat( iRand );
60 for( int j = 0; j < iRand; j++ ) 60 for( int j = 0; j < iRand; j++ )
61 sDat[j] = (char)((uint8_t)(random()%256)); 61 sDat[j] = (char)((uint8_t)(random()%256));
62 ar << sDat; 62 ar << sDat;
@@ -64,7 +64,7 @@ Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const VerifyObject &vo )
64 sum.addData( sDat.getStr(), iRand ); 64 sum.addData( sDat.getStr(), iRand );
65 vo.iBytesWritten += 4 + iRand; 65 vo.iBytesWritten += 4 + iRand;
66 } 66 }
67 Bu::FString sRes = sum.getResult(); 67 Bu::String sRes = sum.getResult();
68 ar << sRes; 68 ar << sRes;
69 vo.iBytesWritten += 4 + sRes.getSize(); 69 vo.iBytesWritten += 4 + sRes.getSize();
70 return ar; 70 return ar;
@@ -79,13 +79,13 @@ Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, VerifyObject &vo )
79 { 79 {
80 int iRand; 80 int iRand;
81// ar >> iRand; 81// ar >> iRand;
82 Bu::FString sStr; 82 Bu::String sStr;
83 ar >> sStr; 83 ar >> sStr;
84 iRand = sStr.getSize(); 84 iRand = sStr.getSize();
85 sum.addData( &iRand, 4 ); 85 sum.addData( &iRand, 4 );
86 sum.addData( sStr.getStr(), iRand ); 86 sum.addData( sStr.getStr(), iRand );
87 } 87 }
88 Bu::FString sSum; 88 Bu::String sSum;
89 ar >> sSum; 89 ar >> sSum;
90 unitTest( sSum == sum.getResult() ); 90 unitTest( sSum == sum.getResult() );
91 int iTooMuch; 91 int iTooMuch;
@@ -104,7 +104,7 @@ suite Myriad
104{ 104{
105 test setSize 105 test setSize
106 { 106 {
107 FString sFileName("myriad-XXXXXXX"); 107 String sFileName("myriad-XXXXXXX");
108 108
109 File fMyriad = tempFile( sFileName ); 109 File fMyriad = tempFile( sFileName );
110 Myriad m( fMyriad, 32 ); 110 Myriad m( fMyriad, 32 );
@@ -194,7 +194,7 @@ suite Myriad
194 194
195 test stressGrow 195 test stressGrow
196 { 196 {
197 FString sFileName("myriad-XXXXXXX"); 197 String sFileName("myriad-XXXXXXX");
198 198
199 File fMyriad = tempFile( sFileName ); 199 File fMyriad = tempFile( sFileName );
200 Myriad m( fMyriad ); 200 Myriad m( fMyriad );
@@ -256,7 +256,7 @@ suite Myriad
256 256
257 test stressTruncate 257 test stressTruncate
258 { 258 {
259 FString sFileName("myriad-XXXXXXX"); 259 String sFileName("myriad-XXXXXXX");
260 260
261 File fMyriad = tempFile( sFileName ); 261 File fMyriad = tempFile( sFileName );
262 Myriad m( fMyriad ); 262 Myriad m( fMyriad );
@@ -289,7 +289,7 @@ suite Myriad
289 289
290 test stressTruncate2 290 test stressTruncate2
291 { 291 {
292 FString sFileName("myriad-XXXXXXX"); 292 String sFileName("myriad-XXXXXXX");
293 293
294 Array<int> aStream; 294 Array<int> aStream;
295 295
@@ -329,7 +329,7 @@ suite Myriad
329 329
330 test stressArchive 330 test stressArchive
331 { 331 {
332 FString sFileName("myriad-XXXXXX"); 332 String sFileName("myriad-XXXXXX");
333 Array<int> aStream; 333 Array<int> aStream;
334 334
335 srandom( 2096 ); 335 srandom( 2096 );
diff --git a/src/unit/queuebuf.unit b/src/unit/queuebuf.unit
index 29ba858..8de29e4 100644
--- a/src/unit/queuebuf.unit
+++ b/src/unit/queuebuf.unit
@@ -30,7 +30,7 @@ suite QueueBuf
30 unitTest( qb.read( buf, 7 ) == 0 ); 30 unitTest( qb.read( buf, 7 ) == 0 );
31 } 31 }
32 32
33 void QBUF_RANDSTR( Bu::FString &fill, unsigned int iSize ) 33 void QBUF_RANDSTR( Bu::String &fill, unsigned int iSize )
34 { 34 {
35 char c; 35 char c;
36 for( unsigned int i=0; i<iSize; ++i ) 36 for( unsigned int i=0; i<iSize; ++i )
@@ -44,7 +44,7 @@ suite QueueBuf
44 { 44 {
45 srandom(time(NULL)); 45 srandom(time(NULL));
46 Bu::QueueBuf qb; 46 Bu::QueueBuf qb;
47 Bu::FString sTmp; 47 Bu::String sTmp;
48 char buf[4096]; 48 char buf[4096];
49 49
50 for( int i=0; i<200; ++i ) 50 for( int i=0; i<200; ++i )
@@ -65,12 +65,12 @@ suite QueueBuf
65 printf("%02x",(int)(uint8_t)s[i]); 65 printf("%02x",(int)(uint8_t)s[i]);
66 } 66 }
67 67
68 void QBUF_HASH( Bu::FString &fill, const char *s, int iSize ) 68 void QBUF_HASH( Bu::String &fill, const char *s, int iSize )
69 { 69 {
70 Bu::Md5 hash; 70 Bu::Md5 hash;
71 hash.reset(); 71 hash.reset();
72 hash.addData( s, iSize ); 72 hash.addData( s, iSize );
73 const Bu::FString &sTmp = hash.getResult(); 73 const Bu::String &sTmp = hash.getResult();
74 fill.append( sTmp.getStr(), 16 ); 74 fill.append( sTmp.getStr(), 16 );
75 } 75 }
76 76
@@ -78,8 +78,8 @@ suite QueueBuf
78 { 78 {
79 srandom(time(NULL)); 79 srandom(time(NULL));
80 Bu::QueueBuf qb; 80 Bu::QueueBuf qb;
81 Bu::FString sTmp; 81 Bu::String sTmp;
82 Bu::FString sTmp2; 82 Bu::String sTmp2;
83 char buf[4096]; 83 char buf[4096];
84 84
85 for( int i=0; i<200; ++i ) 85 for( int i=0; i<200; ++i )
diff --git a/src/unit/taf.unit b/src/unit/taf.unit
index cab04d2..908e591 100644
--- a/src/unit/taf.unit
+++ b/src/unit/taf.unit
@@ -18,7 +18,7 @@ suite Taf
18 test read1 18 test read1
19 { 19 {
20#define FN_TMP ("/tmp/tmpXXXXXXXX") 20#define FN_TMP ("/tmp/tmpXXXXXXXX")
21 Bu::FString sFnTmp(FN_TMP); 21 Bu::String sFnTmp(FN_TMP);
22 Bu::File fOut = Bu::File::tempFile( sFnTmp ); 22 Bu::File fOut = Bu::File::tempFile( sFnTmp );
23 const char *data = 23 const char *data =
24 "{test: name=\"Bob\"}" 24 "{test: name=\"Bob\"}"
@@ -43,7 +43,7 @@ suite Taf
43 Bu::TafWriter tw( mb ); 43 Bu::TafWriter tw( mb );
44 44
45 Bu::TafGroup g("Test data"); 45 Bu::TafGroup g("Test data");
46 Bu::FString sData( 256 ); 46 Bu::String sData( 256 );
47 for( int j = 0; j < 256; j++ ) 47 for( int j = 0; j < 256; j++ )
48 sData[j] = (unsigned char)j; 48 sData[j] = (unsigned char)j;
49 g.addChild( new Bu::TafProperty("Encoded", sData) ); 49 g.addChild( new Bu::TafProperty("Encoded", sData) );
@@ -87,7 +87,7 @@ suite Taf
87 Bu::TafWriter tw( mb ); 87 Bu::TafWriter tw( mb );
88 88
89 Bu::TafGroup g("Test Group"); 89 Bu::TafGroup g("Test Group");
90 Bu::FString sVal; 90 Bu::String sVal;
91 g.addChild( new Bu::TafProperty("Lame", sVal) ); 91 g.addChild( new Bu::TafProperty("Lame", sVal) );
92 tw.writeGroup( &g ); 92 tw.writeGroup( &g );
93 93
diff --git a/src/unit/xml.unit b/src/unit/xml.unit
index 67216f0..b4340e8 100644
--- a/src/unit/xml.unit
+++ b/src/unit/xml.unit
@@ -6,7 +6,7 @@
6 * terms of the license contained in the file LICENSE. 6 * terms of the license contained in the file LICENSE.
7 */ 7 */
8 8
9#include "bu/fstring.h" 9#include "bu/string.h"
10#include "bu/xmlreader.h" 10#include "bu/xmlreader.h"
11#include "bu/membuf.h" 11#include "bu/membuf.h"
12 12
@@ -14,7 +14,7 @@ suite Xml
14{ 14{
15 test declaration 15 test declaration
16 { 16 {
17 Bu::FString sXml("<?xml ?> <hi />"); 17 Bu::String sXml("<?xml ?> <hi />");
18 Bu::MemBuf buf( sXml ); 18 Bu::MemBuf buf( sXml );
19 Bu::XmlReader xr( buf ); 19 Bu::XmlReader xr( buf );
20 } 20 }
diff --git a/src/unitsuite.cpp b/src/unitsuite.cpp
index ce6d037..58646a0 100644
--- a/src/unitsuite.cpp
+++ b/src/unitsuite.cpp
@@ -158,14 +158,14 @@ int Bu::UnitSuite::run( int argc, char *argv[] )
158 return 0; 158 return 0;
159} 159}
160 160
161Bu::File Bu::UnitSuite::tempFile( Bu::FString &sFileName ) 161Bu::File Bu::UnitSuite::tempFile( Bu::String &sFileName )
162{ 162{
163 Bu::File f = Bu::File::tempFile( sFileName ); 163 Bu::File f = Bu::File::tempFile( sFileName );
164 lFileCleanup.append( sFileName ); 164 lFileCleanup.append( sFileName );
165 return f; 165 return f;
166} 166}
167 167
168void Bu::UnitSuite::add( Test fTest, const Bu::FString &sName, Expect e ) 168void Bu::UnitSuite::add( Test fTest, const Bu::String &sName, Expect e )
169{ 169{
170 TestInfo ti; 170 TestInfo ti;
171 ti.sName = sName; 171 ti.sName = sName;
@@ -173,7 +173,7 @@ void Bu::UnitSuite::add( Test fTest, const Bu::FString &sName, Expect e )
173 long index = ti.sName.rfindIdx("::"); 173 long index = ti.sName.rfindIdx("::");
174 if( index != -1 ) 174 if( index != -1 )
175 { 175 {
176 FString tmp = sSuiteName; 176 String tmp = sSuiteName;
177 tmp += ti.sName.getStr()+index; 177 tmp += ti.sName.getStr()+index;
178 ti.sName = tmp; 178 ti.sName = tmp;
179 } 179 }
@@ -183,7 +183,7 @@ void Bu::UnitSuite::add( Test fTest, const Bu::FString &sName, Expect e )
183 iNameWidth = ti.sName.getSize(); 183 iNameWidth = ti.sName.getSize();
184} 184}
185 185
186void Bu::UnitSuite::setName( const FString &sName ) 186void Bu::UnitSuite::setName( const String &sName )
187{ 187{
188 sSuiteName = sName; 188 sSuiteName = sName;
189} 189}
diff --git a/src/unitsuite.h b/src/unitsuite.h
index 475ee48..6ac4f3e 100644
--- a/src/unitsuite.h
+++ b/src/unitsuite.h
@@ -10,7 +10,7 @@
10 10
11#include <stdint.h> 11#include <stdint.h>
12#include "bu/list.h" 12#include "bu/list.h"
13#include "bu/fstring.h" 13#include "bu/string.h"
14#include "bu/file.h" 14#include "bu/file.h"
15#include "bu/array.h" 15#include "bu/array.h"
16 16
@@ -63,7 +63,7 @@ namespace Bu
63 63
64 int run( int argc=0, char *argv[]=NULL ); 64 int run( int argc=0, char *argv[]=NULL );
65 65
66 Bu::File tempFile( Bu::FString &sFileName ); 66 Bu::File tempFile( Bu::String &sFileName );
67 67
68 typedef void (UnitSuite::*Test)(); 68 typedef void (UnitSuite::*Test)();
69 69
@@ -71,12 +71,12 @@ namespace Bu
71 { 71 {
72 public: 72 public:
73 Failed() : str(""), bFile( false ) { } 73 Failed() : str(""), bFile( false ) { }
74 Failed( const FString &s ) : str( s ), bFile( false ) { } 74 Failed( const String &s ) : str( s ), bFile( false ) { }
75 Failed( const FString &s, const FString &sFile, int nLine ) : 75 Failed( const String &s, const String &sFile, int nLine ) :
76 str( s ), sFile( sFile ), nLine( nLine ), bFile( true ) { } 76 str( s ), sFile( sFile ), nLine( nLine ), bFile( true ) { }
77 77
78 FString str; 78 String str;
79 FString sFile; 79 String sFile;
80 int nLine; 80 int nLine;
81 bool bFile; 81 bool bFile;
82 }; 82 };
@@ -93,8 +93,8 @@ namespace Bu
93 }; 93 };
94 94
95 protected: 95 protected:
96 void add( Test fTest, const Bu::FString &sName, Expect e=expectPass ); 96 void add( Test fTest, const Bu::String &sName, Expect e=expectPass );
97 void setName( const FString &sName ); 97 void setName( const String &sName );
98 98
99 void dispProgress(); 99 void dispProgress();
100 void setStepCount( int iSteps ); 100 void setStepCount( int iSteps );
@@ -102,23 +102,23 @@ namespace Bu
102 void setProgress( int iAmnt ); 102 void setProgress( int iAmnt );
103 103
104 private: 104 private:
105 int onListCases( Bu::Array<Bu::FString> aParam ); 105 int onListCases( Bu::Array<Bu::String> aParam );
106 106
107 private: 107 private:
108 typedef struct TestInfo 108 typedef struct TestInfo
109 { 109 {
110 FString sName; 110 String sName;
111 Test fTest; 111 Test fTest;
112 Expect eExpect; 112 Expect eExpect;
113 } TestInfo; 113 } TestInfo;
114 114
115 typedef Bu::List<TestInfo> TestList; 115 typedef Bu::List<TestInfo> TestList;
116 TestList lTests; 116 TestList lTests;
117 FString sSuiteName; 117 String sSuiteName;
118 118
119 int iOptions; 119 int iOptions;
120 120
121 typedef Bu::List<Bu::FString> StrList; 121 typedef Bu::List<Bu::String> StrList;
122 StrList lFileCleanup; 122 StrList lFileCleanup;
123 int iNameWidth; 123 int iNameWidth;
124 int iStepCount; 124 int iStepCount;