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

Side by Side Diff: test/unittests/unittests.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/unittests.h ('k') | test/unittests/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 <cstdlib>
6 #include <cstring>
7 #include <memory>
8
9 #include "include/libplatform/libplatform.h"
10 #include "test/unittests/unittests.h"
11 #include "testing/gmock/include/gmock/gmock.h"
12
13 using ::testing::IsNull;
14 using ::testing::NotNull;
15
16 namespace v8 {
17 namespace internal {
18
19 // static
20 v8::Platform* EngineTest::platform_ = NULL;
21
22
23 // static
24 void EngineTest::SetUpTestCase() {
25 EXPECT_THAT(platform_, IsNull());
26 platform_ = v8::platform::CreateDefaultPlatform();
27 EXPECT_THAT(platform_, NotNull());
28 v8::V8::InitializePlatform(platform_);
29 EXPECT_TRUE(v8::V8::Initialize());
30 }
31
32
33 // static
34 void EngineTest::TearDownTestCase() {
35 EXPECT_THAT(platform_, NotNull());
36 v8::V8::Dispose();
37 v8::V8::ShutdownPlatform();
38 delete platform_;
39 platform_ = NULL;
40 }
41
42 } // namespace internal
43 } // namespace v8
44
45
46 int main(int argc, char** argv) {
47 testing::InitGoogleMock(&argc, argv);
48 v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
49 return RUN_ALL_TESTS();
50 }
OLDNEW
« no previous file with comments | « test/unittests/unittests.h ('k') | test/unittests/unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698