| Index: test/unittests/test-isolate.h
|
| diff --git a/test/unittests/test-isolate.h b/test/unittests/test-isolate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..589b0bcb6b8f6157bc05648fa709fc9270e8fc52
|
| --- /dev/null
|
| +++ b/test/unittests/test-isolate.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2014 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef V8_UNITTESTS_TEST_ISOLATE_H_
|
| +#define V8_UNITTESTS_TEST_ISOLATE_H_
|
| +
|
| +#include "include/v8.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace v8 {
|
| +namespace internal {
|
| +
|
| +// Forward declarations.
|
| +class Isolate;
|
| +
|
| +class IsolateTest : public ::testing::Test {
|
| + public:
|
| + IsolateTest();
|
| + ~IsolateTest();
|
| +
|
| + v8::Isolate* isolate() const;
|
| + Isolate* i_isolate() const { return reinterpret_cast<Isolate*>(isolate()); }
|
| +
|
| + private:
|
| + v8::Isolate* isolate_;
|
| +};
|
| +
|
| +
|
| +class ContextTest : public virtual IsolateTest {
|
| + public:
|
| + ContextTest()
|
| + : handle_scope_(isolate()), context_scope_(v8::Context::New(isolate())) {}
|
| +
|
| + private:
|
| + v8::HandleScope handle_scope_;
|
| + v8::Context::Scope context_scope_;
|
| +};
|
| +
|
| +} // namespace internal
|
| +} // namespace v8
|
| +
|
| +#endif // V8_UNITTESTS_TEST_ISOLATE_H_
|
|
|