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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/compiler/test-instruction-selector.cc ('k') | test/unittests/test-isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/test-isolate.h
diff --git a/test/unittests/test-isolate.h b/test/unittests/test-isolate.h
new file mode 100644
index 0000000000000000000000000000000000000000..a03dfd6f3d2ea86dab50904e382c085a1a3043cb
--- /dev/null
+++ b/test/unittests/test-isolate.h
@@ -0,0 +1,42 @@
+// 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.
+
+#ifndef V8_UNITTESTS_TEST_ISOLATE_H_
+#define V8_UNITTESTS_TEST_ISOLATE_H_
+
+#include "test/unittests/unittests.h"
+
+namespace v8 {
+namespace internal {
+
+class IsolateTest : public EngineTest {
+ public:
+ IsolateTest();
+ virtual ~IsolateTest();
+
+ v8::Isolate* isolate() const;
+ Isolate* i_isolate() const { return reinterpret_cast<Isolate*>(isolate()); }
+
+ private:
+ v8::Isolate* isolate_;
+
+ DISALLOW_COPY_AND_ASSIGN(IsolateTest);
+};
+
+
+class ContextTest : public virtual IsolateTest {
+ public:
+ ContextTest()
+ : handle_scope_(isolate()), context_scope_(v8::Context::New(isolate())) {}
+ virtual ~ContextTest() {}
+
+ private:
+ v8::HandleScope handle_scope_;
+ v8::Context::Scope context_scope_;
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_UNITTESTS_TEST_ISOLATE_H_
« no previous file with comments | « test/unittests/compiler/test-instruction-selector.cc ('k') | test/unittests/test-isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698