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

Side by Side Diff: src/test/test-utils.cc

Issue 615393002: Move unit tests to test/unittests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/test/test-utils.h ('k') | test/base-unittests/base-unittests.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "src/test/test-utils.h"
6
7 #include "src/isolate-inl.h"
8
9 namespace v8 {
10
11 // static
12 Isolate* TestWithIsolate::isolate_ = NULL;
13
14
15 TestWithIsolate::TestWithIsolate()
16 : isolate_scope_(isolate()), handle_scope_(isolate()) {}
17
18
19 TestWithIsolate::~TestWithIsolate() {}
20
21
22 // static
23 void TestWithIsolate::SetUpTestCase() {
24 Test::SetUpTestCase();
25 EXPECT_EQ(NULL, isolate_);
26 isolate_ = v8::Isolate::New();
27 EXPECT_TRUE(isolate_ != NULL);
28 }
29
30
31 // static
32 void TestWithIsolate::TearDownTestCase() {
33 ASSERT_TRUE(isolate_ != NULL);
34 isolate_->Dispose();
35 isolate_ = NULL;
36 Test::TearDownTestCase();
37 }
38
39
40 TestWithContext::TestWithContext()
41 : context_(Context::New(isolate())), context_scope_(context_) {}
42
43
44 TestWithContext::~TestWithContext() {}
45
46
47 namespace internal {
48
49 TestWithIsolate::~TestWithIsolate() {}
50
51
52 Factory* TestWithIsolate::factory() const { return isolate()->factory(); }
53
54
55 TestWithZone::~TestWithZone() {}
56
57 } // namespace internal
58 } // namespace v8
OLDNEW
« no previous file with comments | « src/test/test-utils.h ('k') | test/base-unittests/base-unittests.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698