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

Side by Side Diff: test/unittests/compiler/zone-pool-unittest.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 "src/base/utils/random-number-generator.h" 5 #include "src/base/utils/random-number-generator.h"
6 #include "src/compiler/zone-pool.h" 6 #include "src/compiler/zone-pool.h"
7 #include "test/unittests/test-utils.h" 7 #include "test/unittests/test-utils.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace compiler { 11 namespace compiler {
12 12
13 class ZonePoolTest : public TestWithIsolate { 13 class ZonePoolTest : public TestWithIsolate {
14 public: 14 public:
15 ZonePoolTest() : zone_pool_(isolate()) {} 15 ZonePoolTest() {}
16 16
17 protected: 17 protected:
18 ZonePool* zone_pool() { return &zone_pool_; } 18 ZonePool* zone_pool() { return &zone_pool_; }
19 19
20 void ExpectForPool(size_t current, size_t max, size_t total) { 20 void ExpectForPool(size_t current, size_t max, size_t total) {
21 ASSERT_EQ(current, zone_pool()->GetCurrentAllocatedBytes()); 21 ASSERT_EQ(current, zone_pool()->GetCurrentAllocatedBytes());
22 ASSERT_EQ(max, zone_pool()->GetMaxAllocatedBytes()); 22 ASSERT_EQ(max, zone_pool()->GetMaxAllocatedBytes());
23 ASSERT_EQ(total, zone_pool()->GetTotalAllocatedBytes()); 23 ASSERT_EQ(total, zone_pool()->GetTotalAllocatedBytes());
24 } 24 }
25 25
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 ExpectForPool(outer_allocated, max_loop_allocation, total_allocated); 153 ExpectForPool(outer_allocated, max_loop_allocation, total_allocated);
154 } 154 }
155 } 155 }
156 Expect(&outer_stats, 0, max_loop_allocation, total_allocated); 156 Expect(&outer_stats, 0, max_loop_allocation, total_allocated);
157 ExpectForPool(0, max_loop_allocation, total_allocated); 157 ExpectForPool(0, max_loop_allocation, total_allocated);
158 } 158 }
159 159
160 } // namespace compiler 160 } // namespace compiler
161 } // namespace internal 161 } // namespace internal
162 } // namespace v8 162 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/simplified-operator-reducer-unittest.cc ('k') | test/unittests/test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698