diff options
Diffstat (limited to 'src/unit/myriad.unit')
-rw-r--r-- | src/unit/myriad.unit | 20 |
1 files changed, 10 insertions, 10 deletions
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 ); |