aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/json_util_test.cc
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2015-08-22 18:25:48 -0700
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2015-08-22 18:25:48 -0700
commiteee38b0c018b3279f77d03dff796f440f40d3516 (patch)
tree7ff0978e30238d493fc7899b75abeb6d66939f07 /src/google/protobuf/util/json_util_test.cc
parentc3bc155aceda36ecb01cde2367a3b427f2d7ce40 (diff)
Down-integrate from google3.
Diffstat (limited to 'src/google/protobuf/util/json_util_test.cc')
-rw-r--r--src/google/protobuf/util/json_util_test.cc43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/google/protobuf/util/json_util_test.cc b/src/google/protobuf/util/json_util_test.cc
index 8399b408..7f88e672 100644
--- a/src/google/protobuf/util/json_util_test.cc
+++ b/src/google/protobuf/util/json_util_test.cc
@@ -98,27 +98,28 @@ TEST_F(JsonUtilTest, TestWhitespaces) {
ToJson(m, options));
}
-TEST_F(JsonUtilTest, TestDefaultValues) {
- TestMessage m;
- JsonOptions options;
- EXPECT_EQ("{}", ToJson(m, options));
- options.always_print_primitive_fields = true;
- EXPECT_EQ(
- "{\"boolValue\":false,"
- "\"int32Value\":0,"
- "\"int64Value\":\"0\","
- "\"uint32Value\":0,"
- "\"uint64Value\":\"0\","
- "\"floatValue\":0,"
- "\"doubleValue\":0,"
- "\"stringValue\":\"\","
- "\"bytesValue\":\"\","
- // TODO(xiaofeng): The default enum value should be FOO. I believe
- // this is a bug in DefaultValueObjectWriter.
- "\"enumValue\":null"
- "}",
- ToJson(m, options));
-}
+// TODO(skarvaje): Uncomment after cl/96232915 is submitted.
+// TEST_F(JsonUtilTest, TestDefaultValues) {
+ // TestMessage m;
+ // JsonOptions options;
+ // EXPECT_EQ("{}", ToJson(m, options));
+ // options.always_print_primitive_fields = true;
+ // EXPECT_EQ(
+ // "{\"boolValue\":false,"
+ // "\"int32Value\":0,"
+ // "\"int64Value\":\"0\","
+ // "\"uint32Value\":0,"
+ // "\"uint64Value\":\"0\","
+ // "\"floatValue\":0,"
+ // "\"doubleValue\":0,"
+ // "\"stringValue\":\"\","
+ // "\"bytesValue\":\"\","
+ // // TODO(xiaofeng): The default enum value should be FOO. I believe
+ // // this is a bug in DefaultValueObjectWriter.
+ // "\"enumValue\":null"
+ // "}",
+ // ToJson(m, options));
+// }
TEST_F(JsonUtilTest, ParseMessage) {
// Some random message but good enough to verify that the parsing warpper