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

Unified Diff: base/strings/string_number_conversions_unittest.cc

Issue 13878015: Avoid C++11 narrowing errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@speech-dispatcher-version-fix
Patch Set: Try to make MSVC happy Created 7 years, 8 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 | « no previous file | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_number_conversions_unittest.cc
diff --git a/base/strings/string_number_conversions_unittest.cc b/base/strings/string_number_conversions_unittest.cc
index fe22be9e56154362dd405362a8fabd91036c3113..937bfb8e1550c8ad892006c7bcbd7808702921c6 100644
--- a/base/strings/string_number_conversions_unittest.cc
+++ b/base/strings/string_number_conversions_unittest.cc
@@ -317,19 +317,19 @@ TEST(StringNumberConversionsTest, HexStringToUInt64) {
} cases[] = {
{"0", 0, true},
{"42", 66, true},
- {"-42", -66, true},
+ {"-42", static_cast<uint64>(-66), true},
{"+42", 66, true},
{"40acd88557b", GG_INT64_C(4444444448123), true},
{"7fffffff", INT_MAX, true},
- {"-80000000", INT_MIN, true},
+ {"-80000000", static_cast<uint64>(INT_MIN), true},
{"ffffffff", 0xffffffff, true},
{"DeadBeef", 0xdeadbeef, true},
{"0x42", 66, true},
- {"-0x42", -66, true},
+ {"-0x42", static_cast<uint64>(-66), true},
{"+0x42", 66, true},
{"0x40acd88557b", GG_INT64_C(4444444448123), true},
{"0x7fffffff", INT_MAX, true},
- {"-0x80000000", INT_MIN, true},
+ {"-0x80000000", static_cast<uint64>(INT_MIN), true},
{"0xffffffff", 0xffffffff, true},
{"0XDeadBeef", 0xdeadbeef, true},
{"0x7fffffffffffffff", kint64max, true},
« no previous file with comments | « no previous file | net/spdy/spdy_test_util_spdy3.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698