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

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

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Renamed defines to match new file locations 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/zone.h"
marja 2016/09/19 08:05:11 Here you should include the accounting allocator t
heimbuef 2016/09/19 10:47:52 Done.
12 #include "testing/gtest-support.h" 12 #include "testing/gtest-support.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 15
16 class ArrayBufferAllocator; 16 class ArrayBufferAllocator;
17 17
18 18
19 class TestWithIsolate : public virtual ::testing::Test { 19 class TestWithIsolate : public virtual ::testing::Test {
20 public: 20 public:
21 TestWithIsolate(); 21 TestWithIsolate();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 97
98 class TestWithZone : public virtual ::testing::Test { 98 class TestWithZone : public virtual ::testing::Test {
99 public: 99 public:
100 TestWithZone() : zone_(&allocator_) {} 100 TestWithZone() : zone_(&allocator_) {}
101 virtual ~TestWithZone(); 101 virtual ~TestWithZone();
102 102
103 Zone* zone() { return &zone_; } 103 Zone* zone() { return &zone_; }
104 104
105 private: 105 private:
106 base::AccountingAllocator allocator_; 106 v8::internal::AccountingAllocator allocator_;
107 Zone zone_; 107 Zone zone_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(TestWithZone); 109 DISALLOW_COPY_AND_ASSIGN(TestWithZone);
110 }; 110 };
111 111
112 112
113 class TestWithIsolateAndZone : public virtual TestWithIsolate { 113 class TestWithIsolateAndZone : public virtual TestWithIsolate {
114 public: 114 public:
115 TestWithIsolateAndZone() : zone_(&allocator_) {} 115 TestWithIsolateAndZone() : zone_(&allocator_) {}
116 virtual ~TestWithIsolateAndZone(); 116 virtual ~TestWithIsolateAndZone();
117 117
118 Zone* zone() { return &zone_; } 118 Zone* zone() { return &zone_; }
119 119
120 private: 120 private:
121 base::AccountingAllocator allocator_; 121 v8::internal::AccountingAllocator allocator_;
122 Zone zone_; 122 Zone zone_;
123 123
124 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone); 124 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone);
125 }; 125 };
126 126
127 } // namespace internal 127 } // namespace internal
128 } // namespace v8 128 } // namespace v8
129 129
130 #endif // V8_UNITTESTS_TEST_UTILS_H_ 130 #endif // V8_UNITTESTS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698