mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-26 01:10:04 +08:00
Add unit test
This commit is contained in:
parent
81a4e7d32d
commit
2df0797eec
@ -499,4 +499,17 @@ TEST_CASE("/flow/FlatBuffers/Void") {
|
|||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("/flow/FlatBuffers/EmptyStrings") {
|
||||||
|
int kSize = 10;
|
||||||
|
Standalone<StringRef> msg = ObjectWriter::toValue(std::vector<StringRef>(kSize), Unversioned());
|
||||||
|
ObjectReader rd(msg.begin(), Unversioned());
|
||||||
|
std::vector<StringRef> xs;
|
||||||
|
rd.deserialize(xs);
|
||||||
|
ASSERT(xs.size() == kSize);
|
||||||
|
for (const auto& x : xs) {
|
||||||
|
ASSERT(x == StringRef());
|
||||||
|
}
|
||||||
|
return Void();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace unit_tests
|
} // namespace unit_tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user