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

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

Issue 439863004: Initial import of unittests using GTest/GMock. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix invalid EXPECT_EQ 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
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 #ifndef V8_UNITTESTS_TEST_ISOLATE_H_
6 #define V8_UNITTESTS_TEST_ISOLATE_H_
7
8 #include "include/v8.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace v8 {
12 namespace internal {
13
14 // Forward declarations.
15 class Isolate;
16
17 class IsolateTest : public ::testing::Test {
18 public:
19 IsolateTest();
20 ~IsolateTest();
jochen (gone - plz use gerrit) 2014/08/05 07:36:19 i bet that needs to be virtual (and all other test
Benedikt Meurer 2014/08/05 08:01:53 Done.
21
22 v8::Isolate* isolate() const;
23 Isolate* i_isolate() const { return reinterpret_cast<Isolate*>(isolate()); }
24
25 private:
26 v8::Isolate* isolate_;
27 };
jochen (gone - plz use gerrit) 2014/08/05 07:36:19 DISALLOW_COPY_AND_ASSIGN()....
Benedikt Meurer 2014/08/05 08:01:52 Done.
28
29
30 class ContextTest : public virtual IsolateTest {
31 public:
32 ContextTest()
33 : handle_scope_(isolate()), context_scope_(v8::Context::New(isolate())) {}
34
35 private:
36 v8::HandleScope handle_scope_;
37 v8::Context::Scope context_scope_;
38 };
39
40 } // namespace internal
41 } // namespace v8
42
43 #endif // V8_UNITTESTS_TEST_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698