| Index: test/runtime-unittests/runtime-unittests.cc
|
| diff --git a/test/compiler-unittests/compiler-unittests.cc b/test/runtime-unittests/runtime-unittests.cc
|
| similarity index 64%
|
| copy from test/compiler-unittests/compiler-unittests.cc
|
| copy to test/runtime-unittests/runtime-unittests.cc
|
| index 86d12400135b3a84f259d594121e174b3a35d10f..af06be171096a8457e5eb70722c80b7688ec5320 100644
|
| --- a/test/compiler-unittests/compiler-unittests.cc
|
| +++ b/test/runtime-unittests/runtime-unittests.cc
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "include/libplatform/libplatform.h"
|
| #include "src/isolate-inl.h"
|
| -#include "test/compiler-unittests/compiler-unittests.h"
|
| +#include "test/runtime-unittests/runtime-unittests.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| using testing::IsNull;
|
| @@ -12,27 +12,26 @@ using testing::NotNull;
|
|
|
| namespace v8 {
|
| namespace internal {
|
| -namespace compiler {
|
|
|
| // static
|
| -v8::Isolate* CompilerTest::isolate_ = NULL;
|
| +v8::Isolate* RuntimeTest::isolate_ = NULL;
|
|
|
|
|
| -CompilerTest::CompilerTest()
|
| - : isolate_scope_(isolate_),
|
| - handle_scope_(isolate_),
|
| - context_scope_(v8::Context::New(isolate_)),
|
| - zone_(isolate()) {}
|
| +RuntimeTest::RuntimeTest()
|
| + : isolate_scope_(isolate_), handle_scope_(isolate_), zone_(isolate()) {}
|
|
|
|
|
| -CompilerTest::~CompilerTest() {}
|
| +RuntimeTest::~RuntimeTest() {}
|
|
|
|
|
| -Factory* CompilerTest::factory() const { return isolate()->factory(); }
|
| +Factory* RuntimeTest::factory() const { return isolate()->factory(); }
|
| +
|
| +
|
| +Heap* RuntimeTest::heap() const { return isolate()->heap(); }
|
|
|
|
|
| // static
|
| -void CompilerTest::SetUpTestCase() {
|
| +void RuntimeTest::SetUpTestCase() {
|
| Test::SetUpTestCase();
|
| EXPECT_THAT(isolate_, IsNull());
|
| isolate_ = v8::Isolate::New();
|
| @@ -41,24 +40,23 @@ void CompilerTest::SetUpTestCase() {
|
|
|
|
|
| // static
|
| -void CompilerTest::TearDownTestCase() {
|
| +void RuntimeTest::TearDownTestCase() {
|
| ASSERT_THAT(isolate_, NotNull());
|
| isolate_->Dispose();
|
| isolate_ = NULL;
|
| Test::TearDownTestCase();
|
| }
|
|
|
| -} // namespace compiler
|
| } // namespace internal
|
| } // namespace v8
|
|
|
|
|
| namespace {
|
|
|
| -class CompilerTestEnvironment V8_FINAL : public ::testing::Environment {
|
| +class RuntimeTestEnvironment V8_FINAL : public ::testing::Environment {
|
| public:
|
| - CompilerTestEnvironment() : platform_(NULL) {}
|
| - ~CompilerTestEnvironment() {}
|
| + RuntimeTestEnvironment() : platform_(NULL) {}
|
| + virtual ~RuntimeTestEnvironment() {}
|
|
|
| virtual void SetUp() V8_OVERRIDE {
|
| EXPECT_THAT(platform_, IsNull());
|
| @@ -79,12 +77,12 @@ class CompilerTestEnvironment V8_FINAL : public ::testing::Environment {
|
| v8::Platform* platform_;
|
| };
|
|
|
| -}
|
| +} // namespace
|
|
|
|
|
| int main(int argc, char** argv) {
|
| testing::InitGoogleMock(&argc, argv);
|
| - testing::AddGlobalTestEnvironment(new CompilerTestEnvironment);
|
| + testing::AddGlobalTestEnvironment(new RuntimeTestEnvironment);
|
| v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
|
| return RUN_ALL_TESTS();
|
| }
|
|
|