Skip to content

Commit 4aeed37

Browse files
nareddytvitalybuka
authored andcommitted
Review comments
Signed-off-by: Teju Nareddy <[email protected]>
1 parent 45d4dae commit 4aeed37

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/mutator_test.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,14 @@ const char kOptionalInDeepAnyFields[] = R"(
293293
}
294294
)";
295295

296-
const char kUnknownField[] = R"(
296+
const char kUnknownFieldInput[] = R"(
297297
optional_bool: true
298298
unknown_field: "test unknown field"
299299
)";
300300

301+
const char kUnknownFieldExpected[] = R"(optional_bool: true
302+
)";
303+
301304
class TestMutator : public Mutator {
302305
public:
303306
explicit TestMutator(bool keep_initialized,
@@ -673,10 +676,10 @@ TYPED_TEST(MutatorTypedTest, Serialization) {
673676
}
674677
}
675678

676-
TYPED_TEST(MutatorTypedTest, UnknownSerialization) {
679+
TYPED_TEST(MutatorTypedTest, UnknownFieldTextFormat) {
677680
typename TestFixture::Message parsed;
678-
EXPECT_TRUE(ParseTextMessage(kUnknownField, &parsed));
679-
EXPECT_NE(SaveMessageAsText(parsed), kUnknownField);
681+
EXPECT_TRUE(ParseTextMessage(kUnknownFieldInput, &parsed));
682+
EXPECT_EQ(SaveMessageAsText(parsed), kUnknownFieldExpected);
680683
}
681684

682685
TYPED_TEST(MutatorTypedTest, DeepRecursion) {

0 commit comments

Comments
 (0)