aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2015-12-30 01:18:22 -0800
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2015-12-30 01:18:22 -0800
commit17347e3d0d86413eb6bca6fa077bfc319818b32a (patch)
treeb32808e16f6ec26490817d59f96e8c4cb0d1a6dd /src/google/protobuf/util/internal/protostream_objectwriter_test.cc
parent283c40c8972e0096dd10c9d58685f71e8c19d783 (diff)
Fix for Visual Studio 2008.
Diffstat (limited to 'src/google/protobuf/util/internal/protostream_objectwriter_test.cc')
-rw-r--r--src/google/protobuf/util/internal/protostream_objectwriter_test.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/google/protobuf/util/internal/protostream_objectwriter_test.cc b/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
index c7667c21..5f9ffb95 100644
--- a/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
+++ b/src/google/protobuf/util/internal/protostream_objectwriter_test.cc
@@ -1685,13 +1685,17 @@ TEST_P(ProtoStreamObjectWriterFieldMaskTest, MapKeyMustBeEscapedCorrectly) {
TEST_P(ProtoStreamObjectWriterFieldMaskTest, MapKeyCanContainAnyChars) {
FieldMaskTest expected;
expected.mutable_single_mask()->add_paths(
- "path.to.map[\"(),[],\\\"'!@#$%^&*123_|War孙天涌,./?><\\\\\"]");
+ // \xE5\xAD\x99 is the UTF-8 byte sequence for chinese character 孙.
+ // We cannot embed non-ASCII characters in the code directly because
+ // some windows compilers will try to interpret them using the system's
+ // current encoding and end up with invalid UTF-8 byte sequence.
+ "path.to.map[\"(),[],\\\"'!@#$%^&*123_|War\xE5\xAD\x99,./?><\\\\\"]");
expected.mutable_single_mask()->add_paths("path.to.map[\"key2\"]");
ow_->StartObject("");
ow_->RenderString(
"single_mask",
- "path.to.map[\"(),[],\\\"'!@#$%^&*123_|War孙天涌,./?><\\\\\"],"
+ "path.to.map[\"(),[],\\\"'!@#$%^&*123_|War\xE5\xAD\x99,./?><\\\\\"],"
"path.to.map[\"key2\"]");
ow_->EndObject();