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

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

Issue 475233005: Setup heap-unittests and runtime-unittests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also add heap-unittests. 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/heap-unittests/heap-unittests.h ('k') | test/heap-unittests/heap-unittests.gyp » ('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 "include/libplatform/libplatform.h"
6 #include "include/v8.h"
7 #include "testing/gmock/include/gmock/gmock.h"
8
9 using testing::IsNull;
10 using testing::NotNull;
11
12 namespace {
13
14 class HeapTestEnvironment V8_FINAL : public ::testing::Environment {
15 public:
16 HeapTestEnvironment() : platform_(NULL) {}
17 virtual ~HeapTestEnvironment() {}
18
19 virtual void SetUp() V8_OVERRIDE {
20 EXPECT_THAT(platform_, IsNull());
21 platform_ = v8::platform::CreateDefaultPlatform();
22 v8::V8::InitializePlatform(platform_);
23 ASSERT_TRUE(v8::V8::Initialize());
24 }
25
26 virtual void TearDown() V8_OVERRIDE {
27 ASSERT_THAT(platform_, NotNull());
28 v8::V8::Dispose();
29 v8::V8::ShutdownPlatform();
30 delete platform_;
31 platform_ = NULL;
32 }
33
34 private:
35 v8::Platform* platform_;
36 };
37
38 } // namespace
39
40
41 int main(int argc, char** argv) {
42 testing::InitGoogleMock(&argc, argv);
43 testing::AddGlobalTestEnvironment(new HeapTestEnvironment);
44 v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
45 return RUN_ALL_TESTS();
46 }
OLDNEW
« no previous file with comments | « test/heap-unittests/heap-unittests.h ('k') | test/heap-unittests/heap-unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698