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

Unified Diff: base/strings/string_number_conversions_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/safe_sprintf_unittest.cc ('k') | base/strings/string_util_unittest.cc » ('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 271c6bb7b801d0ddaa2be00d149f62d180a279ef..134ba01720fe2aab4ccd5333d9e6343269f3de9a 100644
--- a/base/strings/string_number_conversions_unittest.cc
+++ b/base/strings/string_number_conversions_unittest.cc
@@ -473,7 +473,7 @@ TEST(StringNumberConversionsTest, HexStringToInt) {
// One additional test to verify that conversion of numbers in strings with
// embedded NUL characters. The NUL and extra data after it should be
// interpreted as junk after the number.
- const char input[] = "0xc0ffee\09";
+ const char input[] = "0xc0ffee\0" "9";
std::string input_string(input, arraysize(input) - 1);
int output;
EXPECT_FALSE(HexStringToInt(input_string, &output));
@@ -533,7 +533,7 @@ TEST(StringNumberConversionsTest, HexStringToUInt) {
// One additional test to verify that conversion of numbers in strings with
// embedded NUL characters. The NUL and extra data after it should be
// interpreted as junk after the number.
- const char input[] = "0xc0ffee\09";
+ const char input[] = "0xc0ffee\0" "9";
std::string input_string(input, arraysize(input) - 1);
uint32 output;
EXPECT_FALSE(HexStringToUInt(input_string, &output));
@@ -590,7 +590,7 @@ TEST(StringNumberConversionsTest, HexStringToInt64) {
// One additional test to verify that conversion of numbers in strings with
// embedded NUL characters. The NUL and extra data after it should be
// interpreted as junk after the number.
- const char input[] = "0xc0ffee\09";
+ const char input[] = "0xc0ffee\0" "9";
std::string input_string(input, arraysize(input) - 1);
int64 output;
EXPECT_FALSE(HexStringToInt64(input_string, &output));
@@ -652,7 +652,7 @@ TEST(StringNumberConversionsTest, HexStringToUInt64) {
// One additional test to verify that conversion of numbers in strings with
// embedded NUL characters. The NUL and extra data after it should be
// interpreted as junk after the number.
- const char input[] = "0xc0ffee\09";
+ const char input[] = "0xc0ffee\0" "9";
std::string input_string(input, arraysize(input) - 1);
uint64 output;
EXPECT_FALSE(HexStringToUInt64(input_string, &output));
@@ -747,7 +747,7 @@ TEST(StringNumberConversionsTest, StringToDouble) {
// One additional test to verify that conversion of numbers in strings with
// embedded NUL characters. The NUL and extra data after it should be
// interpreted as junk after the number.
- const char input[] = "3.14\0159";
+ const char input[] = "3.14\0" "159";
std::string input_string(input, arraysize(input) - 1);
double output;
EXPECT_FALSE(StringToDouble(input_string, &output));
« no previous file with comments | « base/strings/safe_sprintf_unittest.cc ('k') | base/strings/string_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698