src/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc
TEST_F(Utf8ValidationTest, WriteArbitraryBytes) {
  std::string wire_buffer;
  protobuf_unittest::OneBytes input;
  std::vector<std::string> errors;
  {
    ScopedMemoryLog log;
    WriteMessage(kInvalidUTF8String, &input, &wire_buffer);
    errors = log.GetMessages(ERROR);
  }
  ASSERT_EQ(0, errors.size());
}
// Bytes: anything can pass as bytes, use invalid UTF-8 string to test
anything can pass as bytes, use invalid UTF-8 string to test
anything can pass as bytes use invalid UTF - 8 string to test
TEST_F(Utf8ValidationTest, WriteArbitraryBytes) {
  std::string wire_buffer;
  protobuf_unittest::OneBytes input;
  std::vector<std::string> errors;
  {
    ScopedMemoryLog log;
    WriteMessage(kInvalidUTF8String, &input, &wire_buffer);
    errors = log.GetMessages(ERROR);
  }
  ASSERT_EQ(0, errors.size());
}
TEST_F ( Utf8ValidationTest , WriteArbitraryBytes ) { std :: string wire_buffer ; protobuf_unittest :: OneBytes input ; std :: vector < std :: string > errors ; { ScopedMemoryLog log ; WriteMessage ( kInvalidUTF8String , & input , & wire_buffer ) ; errors = log . GetMessages ( ERROR ) ; } ASSERT_EQ ( 0 , errors . size ( ) ) ; }
Bytes: anything can pass as bytes, use invalid UTF-8 string to test
Bytes : anything can pass as bytes use invalid UTF - 8 string to test