OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "include/libplatform/libplatform.h" | 5 #include "include/libplatform/libplatform.h" |
6 #include "include/v8.h" | 6 #include "include/v8.h" |
7 #include "src/base/compiler-specific.h" | 7 #include "src/base/compiler-specific.h" |
8 #include "src/v8.h" | |
8 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
9 | 10 |
10 namespace { | 11 namespace { |
11 | 12 |
12 class DefaultPlatformEnvironment FINAL : public ::testing::Environment { | 13 class DefaultPlatformEnvironment FINAL : public ::testing::Environment { |
13 public: | 14 public: |
14 DefaultPlatformEnvironment() : platform_(NULL) {} | 15 DefaultPlatformEnvironment() : platform_(NULL) {} |
15 ~DefaultPlatformEnvironment() {} | 16 ~DefaultPlatformEnvironment() {} |
16 | 17 |
17 virtual void SetUp() OVERRIDE { | 18 virtual void SetUp() OVERRIDE { |
(...skipping 13 matching lines...) Expand all Loading... | |
31 } | 32 } |
32 | 33 |
33 private: | 34 private: |
34 v8::Platform* platform_; | 35 v8::Platform* platform_; |
35 }; | 36 }; |
36 | 37 |
37 } // namespace | 38 } // namespace |
38 | 39 |
39 | 40 |
40 int main(int argc, char** argv) { | 41 int main(int argc, char** argv) { |
42 // This forces some thread local key initialization that may be need to print | |
Jakob Kummerow
2014/09/26 14:14:35
nit: s/need/needed/
| |
43 // out the names of the unit tests. | |
44 i::V8::Initialize(); | |
41 testing::InitGoogleMock(&argc, argv); | 45 testing::InitGoogleMock(&argc, argv); |
42 testing::AddGlobalTestEnvironment(new DefaultPlatformEnvironment); | 46 testing::AddGlobalTestEnvironment(new DefaultPlatformEnvironment); |
43 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); | 47 v8::V8::SetFlagsFromCommandLine(&argc, argv, true); |
44 return RUN_ALL_TESTS(); | 48 return RUN_ALL_TESTS(); |
45 } | 49 } |
OLD | NEW |