aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/json_util_test.cc
diff options
context:
space:
mode:
authorGravatar mike07026 <121458737@qq.com>2016-09-01 20:08:45 +0800
committerGravatar GitHub <noreply@github.com>2016-09-01 20:08:45 +0800
commitdf6088a7e82b3615054d0ec6af3ff3e3e793d6cd (patch)
tree6bd9312ab42d346850f6412a9c4ca6895f46a156 /src/google/protobuf/util/json_util_test.cc
parent5a17660ca0b8116219f6f86df1fcd49f33415777 (diff)
detect invaild JSON encoding in bytes field
Diffstat (limited to 'src/google/protobuf/util/json_util_test.cc')
-rw-r--r--src/google/protobuf/util/json_util_test.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/google/protobuf/util/json_util_test.cc b/src/google/protobuf/util/json_util_test.cc
index 7d394240..24ff5fd6 100644
--- a/src/google/protobuf/util/json_util_test.cc
+++ b/src/google/protobuf/util/json_util_test.cc
@@ -133,29 +133,29 @@ TEST_F(JsonUtilTest, TestDefaultValues) {
m.set_string_value("i am a test string value");
m.set_bytes_value("i am a test bytes value");
EXPECT_EQ(
- "{\"boolValue\":false,"
- "\"int32Value\":0,"
- "\"int64Value\":\"0\","
- "\"uint32Value\":0,"
- "\"uint64Value\":\"0\","
- "\"floatValue\":0,"
- "\"doubleValue\":0,"
- "\"stringValue\":\"i am a test string value\","
- "\"bytesValue\":\"aSBhbSBhIHRlc3QgYnl0ZXMgdmFsdWU=\","
- "\"enumValue\":\"FOO\","
- "\"repeatedBoolValue\":[],"
- "\"repeatedInt32Value\":[],"
- "\"repeatedInt64Value\":[],"
- "\"repeatedUint32Value\":[],"
- "\"repeatedUint64Value\":[],"
- "\"repeatedFloatValue\":[],"
- "\"repeatedDoubleValue\":[],"
- "\"repeatedStringValue\":[],"
- "\"repeatedBytesValue\":[],"
- "\"repeatedEnumValue\":[],"
- "\"repeatedMessageValue\":[]"
- "}",
- ToJson(m, options));
+ "{\"boolValue\":false,"
+ "\"int32Value\":0,"
+ "\"int64Value\":\"0\","
+ "\"uint32Value\":0,"
+ "\"uint64Value\":\"0\","
+ "\"floatValue\":0,"
+ "\"doubleValue\":0,"
+ "\"stringValue\":\"i am a test string value\","
+ "\"bytesValue\":\"aSBhbSBhIHRlc3QgYnl0ZXMgdmFsdWU=\","
+ "\"enumValue\":\"FOO\","
+ "\"repeatedBoolValue\":[],"
+ "\"repeatedInt32Value\":[],"
+ "\"repeatedInt64Value\":[],"
+ "\"repeatedUint32Value\":[],"
+ "\"repeatedUint64Value\":[],"
+ "\"repeatedFloatValue\":[],"
+ "\"repeatedDoubleValue\":[],"
+ "\"repeatedStringValue\":[],"
+ "\"repeatedBytesValue\":[],"
+ "\"repeatedEnumValue\":[],"
+ "\"repeatedMessageValue\":[]"
+ "}",
+ ToJson(m, options));
}
TEST_F(JsonUtilTest, ParseMessage) {