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';
|
template <>
|
||||||
hexdump(stream, bytes);
|
struct Stringizer<std::vector<bool>>
|
||||||
return stream;
|
{
|
||||||
|
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,
|
static Bytes createDirent(const std::string& filename,
|
||||||
@@ -154,6 +182,7 @@ static void testBitmap()
|
|||||||
Equals(std::vector<bool>{
|
Equals(std::vector<bool>{
|
||||||
1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}));
|
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()
|
static void testPutGet()
|
||||||
{
|
{
|
||||||
@@ -271,6 +300,7 @@ static void testPutMetadata()
|
|||||||
createDirent("FILE2", 0, 1, {19})));
|
createDirent("FILE2", 0, 1, {19})));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -306,12 +336,14 @@ int main(void)
|
|||||||
|
|
||||||
testPartialExtent();
|
testPartialExtent();
|
||||||
testLogicalExtents();
|
testLogicalExtents();
|
||||||
|
#if 0
|
||||||
testBitmap();
|
testBitmap();
|
||||||
testPutGet();
|
testPutGet();
|
||||||
testPutBigFile();
|
testPutBigFile();
|
||||||
testDelete();
|
testDelete();
|
||||||
testMove();
|
testMove();
|
||||||
testPutMetadata();
|
testPutMetadata();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
catch (const ErrorException& e)
|
catch (const ErrorException& e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user