bfd37ab267
As per discussion on the V8 team, this is the place we want them to live, not following the Chrome Style Guide for this. BUG=v8:3489 LOG=y R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/615393002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
59 lines
1.1 KiB
C++
59 lines
1.1 KiB
C++
// 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.
|
|
|
|
#include "test/unittests/test-utils.h"
|
|
|
|
#include "src/isolate-inl.h"
|
|
|
|
namespace v8 {
|
|
|
|
// static
|
|
Isolate* TestWithIsolate::isolate_ = NULL;
|
|
|
|
|
|
TestWithIsolate::TestWithIsolate()
|
|
: isolate_scope_(isolate()), handle_scope_(isolate()) {}
|
|
|
|
|
|
TestWithIsolate::~TestWithIsolate() {}
|
|
|
|
|
|
// static
|
|
void TestWithIsolate::SetUpTestCase() {
|
|
Test::SetUpTestCase();
|
|
EXPECT_EQ(NULL, isolate_);
|
|
isolate_ = v8::Isolate::New();
|
|
EXPECT_TRUE(isolate_ != NULL);
|
|
}
|
|
|
|
|
|
// static
|
|
void TestWithIsolate::TearDownTestCase() {
|
|
ASSERT_TRUE(isolate_ != NULL);
|
|
isolate_->Dispose();
|
|
isolate_ = NULL;
|
|
Test::TearDownTestCase();
|
|
}
|
|
|
|
|
|
TestWithContext::TestWithContext()
|
|
: context_(Context::New(isolate())), context_scope_(context_) {}
|
|
|
|
|
|
TestWithContext::~TestWithContext() {}
|
|
|
|
|
|
namespace internal {
|
|
|
|
TestWithIsolate::~TestWithIsolate() {}
|
|
|
|
|
|
Factory* TestWithIsolate::factory() const { return isolate()->factory(); }
|
|
|
|
|
|
TestWithZone::~TestWithZone() {}
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|