mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Merge.
This commit is contained in:
@@ -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<std::vector<bool>>
|
||||
{
|
||||
static std::string ToString(const std::vector<bool>& 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<Bytes>
|
||||
{
|
||||
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<bool>{
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user