Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Unified Diff: third_party/protobuf/src/google/protobuf/wire_format_unittest.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/gmock_mutant.h ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/src/google/protobuf/wire_format_unittest.cc
diff --git a/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc b/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc
index 9822828b1dbefceb4d12229dc45da5998e205d55..9422f9abc73207621698638a12da860e7156df8c 100644
--- a/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc
+++ b/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc
@@ -848,7 +848,7 @@ bool ReadMessage(const string &wire_buffer, T *message) {
return message->ParseFromArray(wire_buffer.data(), wire_buffer.size());
}
-bool StartsWith(const string& s, const string& prefix) {
+bool base::StartsWith(const string& s, const string& prefix) {
return s.substr(0, prefix.length()) == prefix;
}
@@ -863,10 +863,11 @@ TEST(Utf8ValidationTest, WriteInvalidUTF8String) {
}
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
ASSERT_EQ(1, errors.size());
- EXPECT_TRUE(StartsWith(errors[0],
- "String field contains invalid UTF-8 data when "
- "serializing a protocol buffer. Use the "
- "'bytes' type if you intend to send raw bytes."));
+ EXPECT_TRUE(
+ base::StartsWith(errors[0],
+ "String field contains invalid UTF-8 data when "
+ "serializing a protocol buffer. Use the "
+ "'bytes' type if you intend to send raw bytes."));
#else
ASSERT_EQ(0, errors.size());
#endif // GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
@@ -885,10 +886,11 @@ TEST(Utf8ValidationTest, ReadInvalidUTF8String) {
}
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
ASSERT_EQ(1, errors.size());
- EXPECT_TRUE(StartsWith(errors[0],
- "String field contains invalid UTF-8 data when "
- "parsing a protocol buffer. Use the "
- "'bytes' type if you intend to send raw bytes."));
+ EXPECT_TRUE(
+ base::StartsWith(errors[0],
+ "String field contains invalid UTF-8 data when "
+ "parsing a protocol buffer. Use the "
+ "'bytes' type if you intend to send raw bytes."));
#else
ASSERT_EQ(0, errors.size());
« no previous file with comments | « testing/gmock_mutant.h ('k') | third_party/zlib/google/zip_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698