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

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: Address comments 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
« no previous file with comments | « core/fxcrt/fx_basic_gcc.cpp ('k') | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..73e7446de0081e8ee9d8b8b9371bacb6635f6323 100644
--- a/core/fxcrt/fx_basic_gcc_unittest.cpp
+++ b/core/fxcrt/fx_basic_gcc_unittest.cpp
@@ -16,15 +16,16 @@ TEST(fxcrt, FXSYS_atoi) {
EXPECT_EQ(2345, FXSYS_atoi("+2345"));
// The max value.
EXPECT_EQ(2147483647, FXSYS_atoi("2147483647"));
- // The min value.
- EXPECT_EQ(-2147483648, FXSYS_atoi("-2147483648"));
+ // The min value. Written in -1 format to avoid "unary minus operator applied
+ // to unsigned type" warning.
+ EXPECT_EQ(-2147483647 - 1, FXSYS_atoi("-2147483648"));
// 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 +59,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) {
« no previous file with comments | « core/fxcrt/fx_basic_gcc.cpp ('k') | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698