diff --git a/tests/cpmfs.cc b/tests/cpmfs.cc index c386ab28..be815164 100644 --- a/tests/cpmfs.cc +++ b/tests/cpmfs.cc @@ -37,11 +37,39 @@ namespace }; } -static std::ostream& operator<<(std::ostream& stream, const Bytes& bytes) +namespace snowhouse { - stream << '\n'; - hexdump(stream, bytes); - return stream; + template <> + struct Stringizer> + { + static std::string ToString(const std::vector& vector) + { + std::stringstream stream; + stream << '{'; + bool first = true; + for (const auto& item : vector) + { + if (!first) + stream << ", "; + stream << item; + first = false; + } + stream << '}'; + return stream.str(); + } + }; + + template <> + struct Stringizer + { + static std::string ToString(const Bytes& bytes) + { + std::stringstream stream; + stream << '\n'; + hexdump(stream, bytes); + return stream.str(); + } + }; } static Bytes createDirent(const std::string& filename, @@ -154,6 +182,7 @@ static void testBitmap() Equals(std::vector{ 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})); } +#if 0 static void testPutGet() { @@ -271,6 +300,7 @@ static void testPutMetadata() createDirent("FILE2", 0, 1, {19}))); } +#endif int main(void) { try @@ -306,12 +336,14 @@ int main(void) testPartialExtent(); testLogicalExtents(); +#if 0 testBitmap(); testPutGet(); testPutBigFile(); testDelete(); testMove(); testPutMetadata(); +#endif } catch (const ErrorException& e) {