mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 22:20:56 +00:00
GenerateText gives text error on failure
This commit is contained in:
@@ -317,9 +317,9 @@ void ParseProtoBufAsciiTest() {
|
||||
TEST_EQ(parser.Parse("{ A [1 2] C { B:2 }}"), true);
|
||||
// Similarly, in text output, it should omit these.
|
||||
std::string text;
|
||||
auto ok = flatbuffers::GenerateText(
|
||||
auto err = flatbuffers::GenerateText(
|
||||
parser, parser.builder_.GetBufferPointer(), &text);
|
||||
TEST_EQ(ok, true);
|
||||
TEST_NULL(err);
|
||||
TEST_EQ_STR(text.c_str(),
|
||||
"{\n A [\n 1\n 2\n ]\n C {\n B: 2\n }\n}\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user