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

Side by Side Diff: test/unittests/test-isolate.cc

Issue 439863004: Initial import of unittests using GTest/GMock. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 6 years, 4 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 | « test/unittests/test-isolate.h ('k') | test/unittests/test-zone.h » ('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 "test/unittests/test-isolate.h"
6 #include "testing/gmock/include/gmock/gmock.h"
7
8 using testing::NotNull;
9
10 namespace v8 {
11 namespace internal {
12
13 IsolateTest::IsolateTest() : isolate_(v8::Isolate::New()) {
14 ASSERT_THAT(isolate_, NotNull());
15 isolate_->Enter();
16 }
17
18
19 IsolateTest::~IsolateTest() {
20 ASSERT_THAT(isolate_, NotNull());
21 isolate_->Exit();
22 isolate_->Dispose();
23 isolate_ = NULL;
24 }
25
26
27 v8::Isolate* IsolateTest::isolate() const {
28 EXPECT_THAT(isolate_, NotNull());
29 return isolate_;
30 }
31
32
33 TEST_F(IsolateTest, GetCurrent) {
34 EXPECT_THAT(v8::Isolate::GetCurrent(), NotNull());
35 EXPECT_EQ(v8::Isolate::GetCurrent(), isolate());
36 }
37
38 } // namespace internal
39 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/test-isolate.h ('k') | test/unittests/test-zone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698