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

Side by Side Diff: test/unittests/test-utils.h

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Merge branch 'master' into zonefolder Created 4 years, 3 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 #ifndef V8_UNITTESTS_TEST_UTILS_H_ 5 #ifndef V8_UNITTESTS_TEST_UTILS_H_
6 #define V8_UNITTESTS_TEST_UTILS_H_ 6 #define V8_UNITTESTS_TEST_UTILS_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/base/macros.h" 9 #include "src/base/macros.h"
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
11 #include "src/zone.h" 11 #include "src/zone/accounting-allocator.h"
12 #include "src/zone/zone.h"
12 #include "testing/gtest-support.h" 13 #include "testing/gtest-support.h"
13 14
14 namespace v8 { 15 namespace v8 {
15 16
16 class ArrayBufferAllocator; 17 class ArrayBufferAllocator;
17 18
18 19
19 class TestWithIsolate : public virtual ::testing::Test { 20 class TestWithIsolate : public virtual ::testing::Test {
20 public: 21 public:
21 TestWithIsolate(); 22 TestWithIsolate();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 97
97 98
98 class TestWithZone : public virtual ::testing::Test { 99 class TestWithZone : public virtual ::testing::Test {
99 public: 100 public:
100 TestWithZone() : zone_(&allocator_) {} 101 TestWithZone() : zone_(&allocator_) {}
101 virtual ~TestWithZone(); 102 virtual ~TestWithZone();
102 103
103 Zone* zone() { return &zone_; } 104 Zone* zone() { return &zone_; }
104 105
105 private: 106 private:
106 base::AccountingAllocator allocator_; 107 v8::internal::AccountingAllocator allocator_;
107 Zone zone_; 108 Zone zone_;
108 109
109 DISALLOW_COPY_AND_ASSIGN(TestWithZone); 110 DISALLOW_COPY_AND_ASSIGN(TestWithZone);
110 }; 111 };
111 112
112 113
113 class TestWithIsolateAndZone : public virtual TestWithIsolate { 114 class TestWithIsolateAndZone : public virtual TestWithIsolate {
114 public: 115 public:
115 TestWithIsolateAndZone() : zone_(&allocator_) {} 116 TestWithIsolateAndZone() : zone_(&allocator_) {}
116 virtual ~TestWithIsolateAndZone(); 117 virtual ~TestWithIsolateAndZone();
117 118
118 Zone* zone() { return &zone_; } 119 Zone* zone() { return &zone_; }
119 120
120 private: 121 private:
121 base::AccountingAllocator allocator_; 122 v8::internal::AccountingAllocator allocator_;
122 Zone zone_; 123 Zone zone_;
123 124
124 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone); 125 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone);
125 }; 126 };
126 127
127 } // namespace internal 128 } // namespace internal
128 } // namespace v8 129 } // namespace v8
129 130
130 #endif // V8_UNITTESTS_TEST_UTILS_H_ 131 #endif // V8_UNITTESTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « test/unittests/compiler/zone-pool-unittest.cc ('k') | test/unittests/wasm/ast-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698