diff options
Diffstat (limited to 'src/unit/myriad.unit')
-rw-r--r-- | src/unit/myriad.unit | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/unit/myriad.unit b/src/unit/myriad.unit index 91a89c9..09d92a3 100644 --- a/src/unit/myriad.unit +++ b/src/unit/myriad.unit | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "bu/array.h" | 13 | #include "bu/array.h" |
14 | 14 | ||
15 | #include "bu/sio.h" | 15 | #include "bu/sio.h" |
16 | #include "bu/archive.h" | 16 | #include "bu/archivebinary.h" |
17 | #include "bu/md5.h" | 17 | #include "bu/md5.h" |
18 | #include "bu/unitsuite.h" | 18 | #include "bu/unitsuite.h" |
19 | 19 | ||
@@ -23,8 +23,8 @@ using namespace Bu; | |||
23 | 23 | ||
24 | class VerifyObject | 24 | class VerifyObject |
25 | { | 25 | { |
26 | friend Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const VerifyObject &vo ); | 26 | friend Bu::Archive &operator<<( Bu::Archive &ar, const VerifyObject &vo ); |
27 | friend Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, VerifyObject &vo ); | 27 | friend Bu::Archive &operator>>( Bu::Archive &ar, VerifyObject &vo ); |
28 | public: | 28 | public: |
29 | VerifyObject( int iUnits ) : | 29 | VerifyObject( int iUnits ) : |
30 | iUnits( iUnits ), | 30 | iUnits( iUnits ), |
@@ -46,7 +46,7 @@ private: | |||
46 | mutable int iBytesWritten; | 46 | mutable int iBytesWritten; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const VerifyObject &vo ) | 49 | Bu::Archive &operator<<( Bu::Archive &ar, const VerifyObject &vo ) |
50 | { | 50 | { |
51 | Md5 sum; | 51 | Md5 sum; |
52 | ar << vo.iUnits; | 52 | ar << vo.iUnits; |
@@ -70,7 +70,7 @@ Bu::ArchiveBase &operator<<( Bu::ArchiveBase &ar, const VerifyObject &vo ) | |||
70 | return ar; | 70 | return ar; |
71 | } | 71 | } |
72 | 72 | ||
73 | Bu::ArchiveBase &operator>>( Bu::ArchiveBase &ar, VerifyObject &vo ) | 73 | Bu::Archive &operator>>( Bu::Archive &ar, VerifyObject &vo ) |
74 | { | 74 | { |
75 | Md5 sum; | 75 | Md5 sum; |
76 | ar >> vo.iUnits; | 76 | ar >> vo.iUnits; |
@@ -347,7 +347,7 @@ suite Myriad | |||
347 | VerifyObject vo( random()%1024 ); | 347 | VerifyObject vo( random()%1024 ); |
348 | { | 348 | { |
349 | MyriadStream ms = m.openStream( iStream ); | 349 | MyriadStream ms = m.openStream( iStream ); |
350 | Archive ar( ms, Archive::save ); | 350 | ArchiveBinary ar( ms, ArchiveBinary::save ); |
351 | ar << vo; | 351 | ar << vo; |
352 | unitTest( ms.tell() == vo.getBytesWritten() ); | 352 | unitTest( ms.tell() == vo.getBytesWritten() ); |
353 | ms.setSize( ms.tell() ); | 353 | ms.setSize( ms.tell() ); |
@@ -366,12 +366,12 @@ suite Myriad | |||
366 | VerifyObject vo( random()%1024 ); | 366 | VerifyObject vo( random()%1024 ); |
367 | { | 367 | { |
368 | MyriadStream ms = m.openStream( *i ); | 368 | MyriadStream ms = m.openStream( *i ); |
369 | Archive ar( ms, Archive::load ); | 369 | ArchiveBinary ar( ms, ArchiveBinary::load ); |
370 | ar >> vo; | 370 | ar >> vo; |
371 | } | 371 | } |
372 | { | 372 | { |
373 | MyriadStream ms = m.openStream( *i ); | 373 | MyriadStream ms = m.openStream( *i ); |
374 | Archive ar( ms, Archive::save ); | 374 | ArchiveBinary ar( ms, ArchiveBinary::save ); |
375 | ar << vo; | 375 | ar << vo; |
376 | unitTest( ms.tell() == vo.getBytesWritten() ); | 376 | unitTest( ms.tell() == vo.getBytesWritten() ); |
377 | ms.setSize( ms.tell() ); | 377 | ms.setSize( ms.tell() ); |