diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-06-29 08:13:13 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-06-29 08:13:13 +0000 |
commit | e7f9060cec1a9671a65b71cc60457c51edf92c17 (patch) | |
tree | ae2ab36ad2fd2c1ec68b64be385fcc769ddef35b /logd/src/tests | |
parent | 24fdd53f64c84f4ed0533b4480810a8cb67b3071 (diff) |
Utf8Reader does the surrogate filtering; unit test that it works
Diffstat (limited to 'logd/src/tests')
-rw-r--r-- | logd/src/tests/proto_converter/proto_converter_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/logd/src/tests/proto_converter/proto_converter_test.cpp b/logd/src/tests/proto_converter/proto_converter_test.cpp index 0f9c64e4a41..702752e8482 100644 --- a/logd/src/tests/proto_converter/proto_converter_test.cpp +++ b/logd/src/tests/proto_converter/proto_converter_test.cpp @@ -90,13 +90,13 @@ TEST_F(LogRequestTest, log_messages_are_converted_to_request) TEST_F(LogRequestTest, invalid_utf8_is_filtered) { messages.emplace_back(12345, "foo_host", 3, 5, "foo_service", "foo_component", Logger::info, - "valid: \xE2\x82\xAC and \xEF\xBF\xBA; invalid: \xCC surrogate \xED\xBF\xBF overlong \xC1\x81 end" + "valid: \xE2\x82\xAC and \xEF\xBF\xBA; semi-valid: \xED\xA0\xBD\xED\xB8\x80; invalid: \xCC surrogate \xED\xBF\xBF overlong \xC1\x81 end" ); convert(); EXPECT_EQ(1, proto.log_messages_size()); expect_proto_log_message_equal(12345, "foo_host", 3, 5, "foo_service", "foo_component", ProtoLogLevel::LogMessage_Level_INFO, - "valid: \xE2\x82\xAC and \xEF\xBF\xBA; invalid: " FFFD " surrogate " FFFD " overlong " FFFD FFFD " end", + "valid: \xE2\x82\xAC and \xEF\xBF\xBA; semi-valid: " FFFD FFFD "; invalid: " FFFD " surrogate " FFFD " overlong " FFFD FFFD " end", proto.log_messages(0)); } |