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

Unified Diff: core/src/fxcrt/fx_basic_gcc_unittest.cpp

Issue 1800523005: Move core/src/ up to core/. (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
« no previous file with comments | « core/src/fxcrt/fx_basic_gcc.cpp ('k') | core/src/fxcrt/fx_basic_list.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxcrt/fx_basic_gcc_unittest.cpp
diff --git a/core/src/fxcrt/fx_basic_gcc_unittest.cpp b/core/src/fxcrt/fx_basic_gcc_unittest.cpp
deleted file mode 100644
index eb1e0669ae08a5f34664205d80cc5bf4a5c6ab5f..0000000000000000000000000000000000000000
--- a/core/src/fxcrt/fx_basic_gcc_unittest.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/include/fxcrt/fx_system.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-TEST(fxcrt, FXSYS_atoi) {
- EXPECT_EQ(0, FXSYS_atoi(""));
- EXPECT_EQ(0, FXSYS_atoi("0"));
- EXPECT_EQ(-1, FXSYS_atoi("-1"));
- EXPECT_EQ(2345, FXSYS_atoi("2345"));
- EXPECT_EQ(2147483647, FXSYS_atoi("2147483647"));
- EXPECT_EQ(-2147483647, FXSYS_atoi("-2147483647"));
- EXPECT_EQ(9, FXSYS_atoi("9x9"));
-
- // TODO(dsinclair): These are all wacky .....
- EXPECT_EQ(2147483623, FXSYS_atoi("2147483623423412348"));
- EXPECT_EQ(214748364, FXSYS_atoi("2147483648"));
- // The digit is parsed as a positive value, so we end up not being able to
- // handle the largest possible negative value.
- EXPECT_EQ(-214748364, FXSYS_atoi("-2147483648"));
-}
-
-TEST(fxcrt, FXSYS_atoi64) {
- EXPECT_EQ(0, FXSYS_atoi64(""));
- EXPECT_EQ(0, FXSYS_atoi64("0"));
- EXPECT_EQ(-1, FXSYS_atoi64("-1"));
- EXPECT_EQ(2345, FXSYS_atoi64("2345"));
- EXPECT_EQ(9223372036854775807LL, FXSYS_atoi64("9223372036854775807"));
- EXPECT_EQ(-9223372036854775807LL, FXSYS_atoi64("-9223372036854775807"));
- EXPECT_EQ(9, FXSYS_atoi64("9x9"));
-
- // TODO(dsinclair): These are all wacky .....
- EXPECT_EQ(9223372036854712341LL, FXSYS_atoi64("922337203685471234123475807"));
- EXPECT_EQ(922337203685477580LL, FXSYS_atoi64("9223372036854775808"));
- // The digit is parsed as a positive value, so we end up not being able to
- // handle the largest possible negative value.
- EXPECT_EQ(-922337203685477580LL, FXSYS_atoi64("-9223372036854775808"));
-}
-
-TEST(fxcrt, FXSYS_wtoi) {
- EXPECT_EQ(0, FXSYS_wtoi(L""));
- EXPECT_EQ(0, FXSYS_wtoi(L"0"));
- EXPECT_EQ(-1, FXSYS_wtoi(L"-1"));
- EXPECT_EQ(2345, FXSYS_wtoi(L"2345"));
- EXPECT_EQ(2147483647, FXSYS_wtoi(L"2147483647"));
- EXPECT_EQ(-2147483647, FXSYS_wtoi(L"-2147483647"));
- EXPECT_EQ(9, FXSYS_wtoi64(L"9x9"));
-
- // TODO(dsinclair): These are all wacky .....
- EXPECT_EQ(2147483623, FXSYS_wtoi(L"2147483623423412348"));
- EXPECT_EQ(214748364, FXSYS_wtoi(L"2147483648"));
- // The digit is parsed as a positive value, so we end up not being able to
- // handle the largest possible negative value.
- EXPECT_EQ(-214748364, FXSYS_wtoi(L"-2147483648"));
-}
-
-TEST(fxcrt, FXSYS_wtoi64) {
- EXPECT_EQ(0, FXSYS_wtoi64(L""));
- EXPECT_EQ(0, FXSYS_wtoi64(L"0"));
- EXPECT_EQ(-1, FXSYS_wtoi64(L"-1"));
- EXPECT_EQ(2345, FXSYS_wtoi64(L"2345"));
- EXPECT_EQ(9223372036854775807LL, FXSYS_wtoi64(L"9223372036854775807"));
- EXPECT_EQ(-9223372036854775807LL, FXSYS_wtoi64(L"-9223372036854775807"));
- EXPECT_EQ(9, FXSYS_wtoi64(L"9x9"));
-
- // TODO(dsinclair): These are all wacky .....
- EXPECT_EQ(9223372036854712341LL,
- FXSYS_wtoi64(L"922337203685471234123475807"));
- EXPECT_EQ(922337203685477580LL, FXSYS_wtoi64(L"9223372036854775808"));
- // The digit is parsed as a positive value, so we end up not being able to
- // handle the largest possible negative value.
- EXPECT_EQ(-922337203685477580LL, FXSYS_wtoi64(L"-9223372036854775808"));
-}
-
-TEST(fxcrt, FXSYS_atoui) {
- EXPECT_EQ(0, FXSYS_atoui(""));
- EXPECT_EQ(0, FXSYS_atoui("0"));
- EXPECT_EQ(0, FXSYS_atoui("-1"));
- EXPECT_EQ(2345, FXSYS_atoui("2345"));
- EXPECT_EQ(4294967295, FXSYS_atoui("4294967295"));
- EXPECT_EQ(9, FXSYS_atoui("9x9"));
-
- // TODO(dsinclair): These are all wacky .....
- EXPECT_EQ(2147483623, FXSYS_atoi("2147483623423412348"));
- EXPECT_EQ(429496729, FXSYS_atoi("4294967296"));
-}
« no previous file with comments | « core/src/fxcrt/fx_basic_gcc.cpp ('k') | core/src/fxcrt/fx_basic_list.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698