Chromium Code Reviews

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

Issue 2193813002: Add parser finalization step (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 25 matching lines...)
36 }; 36 };
37 37
38 38
39 class TestWithContext : public virtual TestWithIsolate { 39 class TestWithContext : public virtual TestWithIsolate {
40 public: 40 public:
41 TestWithContext(); 41 TestWithContext();
42 virtual ~TestWithContext(); 42 virtual ~TestWithContext();
43 43
44 const Local<Context>& context() const { return context_; } 44 const Local<Context>& context() const { return context_; }
45 45
46 v8::internal::Isolate* i_isolate() const {
47 return reinterpret_cast<v8::internal::Isolate*>(isolate());
48 }
49
46 private: 50 private:
47 Local<Context> context_; 51 Local<Context> context_;
48 Context::Scope context_scope_; 52 Context::Scope context_scope_;
49 53
50 DISALLOW_COPY_AND_ASSIGN(TestWithContext); 54 DISALLOW_COPY_AND_ASSIGN(TestWithContext);
51 }; 55 };
52 56
53 57
54 namespace base { 58 namespace base {
55 59
(...skipping 61 matching lines...)
117 base::AccountingAllocator allocator_; 121 base::AccountingAllocator allocator_;
118 Zone zone_; 122 Zone zone_;
119 123
120 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone); 124 DISALLOW_COPY_AND_ASSIGN(TestWithIsolateAndZone);
121 }; 125 };
122 126
123 } // namespace internal 127 } // namespace internal
124 } // namespace v8 128 } // namespace v8
125 129
126 #endif // V8_UNITTESTS_TEST_UTILS_H_ 130 #endif // V8_UNITTESTS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine