diff options
Diffstat (limited to 'chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc')
-rw-r--r-- | chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc b/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc index 304fb844048..353a5e49b8e 100644 --- a/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc +++ b/chromium/third_party/protobuf/src/google/protobuf/text_format_unittest.cc @@ -858,12 +858,6 @@ TEST_F(TextFormatParserTest, ParseFieldValueFromString) { EXPECT_EQ(value, message->optional_##name()); \ EXPECT_TRUE(message->has_optional_##name()); -#define EXPECT_BOOL_FIELD(name, value, valuestring) \ - EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \ - valuestring, d->FindFieldByName("optional_" #name), message.get())); \ - EXPECT_TRUE(message->optional_##name() == value); \ - EXPECT_TRUE(message->has_optional_##name()); - #define EXPECT_FLOAT_FIELD(name, value, valuestring) \ EXPECT_TRUE(TextFormat::ParseFieldValueFromString( \ valuestring, d->FindFieldByName("optional_" #name), message.get())); \ @@ -921,12 +915,12 @@ TEST_F(TextFormatParserTest, ParseFieldValueFromString) { EXPECT_INVALID(fixed64, "1,2"); // bool - EXPECT_BOOL_FIELD(bool, true, "true"); - EXPECT_BOOL_FIELD(bool, false, "false"); - EXPECT_BOOL_FIELD(bool, true, "1"); - EXPECT_BOOL_FIELD(bool, true, "t"); - EXPECT_BOOL_FIELD(bool, false, "0"); - EXPECT_BOOL_FIELD(bool, false, "f"); + EXPECT_FIELD(bool, true, "true"); + EXPECT_FIELD(bool, false, "false"); + EXPECT_FIELD(bool, true, "1"); + EXPECT_FIELD(bool, true, "t"); + EXPECT_FIELD(bool, false, "0"); + EXPECT_FIELD(bool, false, "f"); EXPECT_INVALID(bool, "2"); EXPECT_INVALID(bool, "-0"); EXPECT_INVALID(bool, "on"); @@ -968,7 +962,6 @@ TEST_F(TextFormatParserTest, ParseFieldValueFromString) { EXPECT_INVALID(nested_message, "any"); #undef EXPECT_FIELD -#undef EXPECT_BOOL_FIELD #undef EXPECT_FLOAT_FIELD #undef EXPECT_DOUBLE_FIELD #undef EXPECT_INVALID |