diff --git a/src/mutator_test.cc b/src/mutator_test.cc index 3e54cea..312b2d9 100644 --- a/src/mutator_test.cc +++ b/src/mutator_test.cc @@ -678,8 +678,8 @@ TYPED_TEST(MutatorTypedTest, Serialization) { TYPED_TEST(MutatorTypedTest, UnknownFieldTextFormat) { typename TestFixture::Message parsed; - EXPECT_FALSE(ParseTextMessage(kUnknownFieldInput, &parsed)); - EXPECT_NE(SaveMessageAsText(parsed), kUnknownFieldExpected); + EXPECT_TRUE(ParseTextMessage(kUnknownFieldInput, &parsed)); + EXPECT_EQ(SaveMessageAsText(parsed), kUnknownFieldExpected); } TYPED_TEST(MutatorTypedTest, DeepRecursion) { diff --git a/src/text_format.cc b/src/text_format.cc index fae6f6e..4479229 100644 --- a/src/text_format.cc +++ b/src/text_format.cc @@ -30,7 +30,7 @@ bool ParseTextMessage(const std::string& data, protobuf::Message* output) { TextFormat::Parser parser; parser.SetRecursionLimit(100); parser.AllowPartialMessage(true); - // parser.AllowUnknownField(true); + parser.AllowUnknownField(true); if (!parser.ParseFromString(data, output)) { output->Clear(); return false;