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

Unified Diff: core/fxcrt/fx_basic_gcc_unittest.cpp

Issue 1849443003: Re-enable all the windows warnings except 4267 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
Index: core/fxcrt/fx_basic_gcc_unittest.cpp
diff --git a/core/fxcrt/fx_basic_gcc_unittest.cpp b/core/fxcrt/fx_basic_gcc_unittest.cpp
index c6913cfd8205075d66fe51a82fd53dd69e94871c..9c7b61f0a1bfcc19229d4b5d34c10cd965664578 100644
--- a/core/fxcrt/fx_basic_gcc_unittest.cpp
+++ b/core/fxcrt/fx_basic_gcc_unittest.cpp
@@ -17,14 +17,14 @@ TEST(fxcrt, FXSYS_atoi) {
// The max value.
EXPECT_EQ(2147483647, FXSYS_atoi("2147483647"));
// The min value.
- EXPECT_EQ(-2147483648, FXSYS_atoi("-2147483648"));
+ EXPECT_EQ(-2147483647 - 1, FXSYS_atoi("-2147483648"));
Tom Sepez 2016/03/30 23:28:29 Not sure what's going on here. Can you explain wh
Wei Li 2016/03/31 01:39:09 Since 2147483648 can not fit into int, it will be
// With invalid char.
EXPECT_EQ(9, FXSYS_atoi("9x9"));
// Out of range values.
EXPECT_EQ(2147483647, FXSYS_atoi("2147483623423412348"));
EXPECT_EQ(2147483647, FXSYS_atoi("2147483648"));
- EXPECT_EQ(-2147483648, FXSYS_atoi("-2147483650"));
+ EXPECT_EQ(-2147483647 - 1, FXSYS_atoi("-2147483650"));
}
TEST(fxcrt, FXSYS_atoi64) {
@@ -58,13 +58,13 @@ TEST(fxcrt, FXSYS_wtoi) {
// The max value.
EXPECT_EQ(2147483647, FXSYS_wtoi(L"2147483647"));
// The min value.
- EXPECT_EQ(-2147483648, FXSYS_wtoi(L"-2147483648"));
+ EXPECT_EQ(-2147483647 - 1, FXSYS_wtoi(L"-2147483648"));
EXPECT_EQ(9, FXSYS_wtoi64(L"9x9"));
// Out of range values.
EXPECT_EQ(2147483647, FXSYS_wtoi(L"2147483623423412348"));
EXPECT_EQ(2147483647, FXSYS_wtoi(L"2147483648"));
- EXPECT_EQ(-2147483648, FXSYS_wtoi(L"-2147483652"));
+ EXPECT_EQ(-2147483647 - 1, FXSYS_wtoi(L"-2147483652"));
}
TEST(fxcrt, FXSYS_wtoi64) {

Powered by Google App Engine
This is Rietveld 408576698