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

Side by Side Diff: core/src/fxcrt/fx_basic_memmgr_unittest.cpp

Issue 1427633010: Fix relative includes within core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « core/src/fxcrt/fx_basic_memmgr.cpp ('k') | core/src/fxcrt/fx_basic_plex.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits> 5 #include <limits>
6 6
7 #include "core/include/fxcrt/fx_memory.h"
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include "../../include/fxcrt/fx_memory.h"
9 9
10 namespace { 10 namespace {
11 11
12 const size_t kMaxByteAlloc = std::numeric_limits<size_t>::max(); 12 const size_t kMaxByteAlloc = std::numeric_limits<size_t>::max();
13 const size_t kMaxIntAlloc = kMaxByteAlloc / sizeof(int); 13 const size_t kMaxIntAlloc = kMaxByteAlloc / sizeof(int);
14 const size_t kOverflowIntAlloc = kMaxIntAlloc + 100; 14 const size_t kOverflowIntAlloc = kMaxIntAlloc + 100;
15 const size_t kWidth = 640; 15 const size_t kWidth = 640;
16 const size_t kOverflowIntAlloc2D = kMaxIntAlloc / kWidth + 10; 16 const size_t kOverflowIntAlloc2D = kMaxIntAlloc / kWidth + 10;
17 17
18 } // namespace 18 } // namespace
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 62
63 TEST(fxcrt, DISABLED_FXMEM_DefaultOOM) { 63 TEST(fxcrt, DISABLED_FXMEM_DefaultOOM) {
64 EXPECT_FALSE(FXMEM_DefaultAlloc(kMaxByteAlloc, 0)); 64 EXPECT_FALSE(FXMEM_DefaultAlloc(kMaxByteAlloc, 0));
65 65
66 void* ptr = FXMEM_DefaultAlloc(1, 0); 66 void* ptr = FXMEM_DefaultAlloc(1, 0);
67 EXPECT_TRUE(ptr); 67 EXPECT_TRUE(ptr);
68 EXPECT_FALSE(FXMEM_DefaultRealloc(ptr, kMaxByteAlloc, 0)); 68 EXPECT_FALSE(FXMEM_DefaultRealloc(ptr, kMaxByteAlloc, 0));
69 FXMEM_DefaultFree(ptr, 0); 69 FXMEM_DefaultFree(ptr, 0);
70 } 70 }
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_basic_memmgr.cpp ('k') | core/src/fxcrt/fx_basic_plex.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698