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

Unified Diff: base/strings/string_util_unittest.cc

Issue 368133002: Fixes for re-enabling more MSVC level 4 warnings: base/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build, attempt 2 Created 6 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 | « base/strings/string_number_conversions_unittest.cc ('k') | base/time/time_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util_unittest.cc
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index 4ea9069a255a82d76c8294245cd1139f4959ee61..0928c0f9d2237e6339b5489017888093022b9911 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -57,7 +57,8 @@ static const struct trim_case_ascii {
namespace {
// Helper used to test TruncateUTF8ToByteSize.
-bool Truncated(const std::string& input, const size_t byte_size,
+bool Truncated(const std::string& input,
+ const size_t byte_size,
std::string* output) {
size_t prev = input.length();
TruncateUTF8ToByteSize(input, byte_size, output);
@@ -74,7 +75,7 @@ TEST(StringUtilTest, TruncateUTF8ToByteSize) {
EXPECT_EQ(output, "");
EXPECT_TRUE(Truncated("\xe1\x80\xbf", 0, &output));
EXPECT_EQ(output, "");
- EXPECT_FALSE(Truncated("\xe1\x80\xbf", -1, &output));
+ EXPECT_FALSE(Truncated("\xe1\x80\xbf", static_cast<size_t>(-1), &output));
EXPECT_FALSE(Truncated("\xe1\x80\xbf", 4, &output));
// Testing the truncation of valid UTF8 correctly
« no previous file with comments | « base/strings/string_number_conversions_unittest.cc ('k') | base/time/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698