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

Unified Diff: courgette/third_party/paged_array_unittest.cc

Issue 1961963003: Move //courgette/third_party to subfolder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes according to comments Created 4 years, 7 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 | « courgette/third_party/paged_array.h ('k') | courgette/third_party/qsufsort.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/third_party/paged_array_unittest.cc
diff --git a/courgette/third_party/paged_array_unittest.cc b/courgette/third_party/paged_array_unittest.cc
deleted file mode 100644
index faa5548fb8f13d870b7ce8666a57b6a0e6817477..0000000000000000000000000000000000000000
--- a/courgette/third_party/paged_array_unittest.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2010 The Chromium 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 "courgette/third_party/paged_array.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-class PagedArrayTest : public testing::Test {
- public:
- // Total allocation of 4GB will fail in 32 bit programs if allocations are
- // leaked.
- static const int kIterations = 20;
- static const int kSize = 200 * 1024 * 1024 / sizeof(int); // 200MB
-};
-
-// AddressSanitizer on Windows adds additional memory overhead, which
-// causes these tests to go OOM and fail.
-#if !defined(ADDRESS_SANITIZER) || !defined(OS_WIN)
-TEST_F(PagedArrayTest, TestManyAllocationsDestructorFree) {
- for (int i = 0; i < kIterations; ++i) {
- courgette::PagedArray<int> a;
- EXPECT_TRUE(a.Allocate(kSize));
- }
-}
-
-TEST_F(PagedArrayTest, TestManyAllocationsManualFree) {
- courgette::PagedArray<int> a;
- for (int i = 0; i < kIterations; ++i) {
- EXPECT_TRUE(a.Allocate(kSize));
- a.clear();
- }
-}
-#endif
-
-TEST_F(PagedArrayTest, TestAccess) {
- const int kAccessSize = 3 * 1024 * 1024;
- courgette::PagedArray<int> a;
- a.Allocate(kAccessSize);
- for (int i = 0; i < kAccessSize; ++i) {
- a[i] = i;
- }
- for (int i = 0; i < kAccessSize; ++i) {
- EXPECT_EQ(i, a[i]);
- }
-}
« no previous file with comments | « courgette/third_party/paged_array.h ('k') | courgette/third_party/qsufsort.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698