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

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

Issue 871843004: Distinquish TestWithIsolateAndZone from TestWithZone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@no_zone_isolate
Patch Set: 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
« no previous file with comments | « test/unittests/compiler/schedule-unittest.cc ('k') | test/unittests/test-utils.cc » ('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 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"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Isolate* isolate() const { 83 Isolate* isolate() const {
84 return reinterpret_cast<Isolate*>(::v8::TestWithIsolate::isolate()); 84 return reinterpret_cast<Isolate*>(::v8::TestWithIsolate::isolate());
85 } 85 }
86 base::RandomNumberGenerator* random_number_generator() const; 86 base::RandomNumberGenerator* random_number_generator() const;
87 87
88 private: 88 private:
89 DISALLOW_COPY_AND_ASSIGN(TestWithIsolate); 89 DISALLOW_COPY_AND_ASSIGN(TestWithIsolate);
90 }; 90 };
91 91
92 92
93 class TestWithZone : public TestWithIsolate { 93 class TestWithZone : public virtual ::testing::Test {
94 public: 94 public:
95 TestWithZone() {} 95 TestWithZone() {}
96 virtual ~TestWithZone(); 96 virtual ~TestWithZone();
97 97
98 Zone* zone() { return &zone_; } 98 Zone* zone() { return &zone_; }
99 99
100 private: 100 private:
101 Zone zone_; 101 Zone zone_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(TestWithZone); 103 DISALLOW_COPY_AND_ASSIGN(TestWithZone);
104 }; 104 };
105 105
106
107 class TestWithIsolateAndZone : public virtual TestWithIsolate {
108 public:
109 TestWithIsolateAndZone() {}
110 virtual ~TestWithIsolateAndZone();
111
112 Zone* zone() { return &zone_; }
113
114 private:
115 Zone zone_;
116
117 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone);
118 };
119
120
106 } // namespace internal 121 } // namespace internal
107 } // namespace v8 122 } // namespace v8
108 123
109 #endif // V8_UNITTESTS_TEST_UTILS_H_ 124 #endif // V8_UNITTESTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « test/unittests/compiler/schedule-unittest.cc ('k') | test/unittests/test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698