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

Side by Side Diff: test/base-unittests/platform/platform-unittest.cc

Issue 510693003: Sync our homegrown SysInfo replacement with the one in Chrome base. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing include. Created 6 years, 3 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/base-unittests/base-unittests.gyp ('k') | test/base-unittests/sys-info-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/base/platform/platform.h" 5 #include "src/base/platform/platform.h"
6 6
7 #if V8_OS_POSIX 7 #if V8_OS_POSIX
8 #include <unistd.h> // NOLINT 8 #include <unistd.h> // NOLINT
9 #endif 9 #endif
10 10
(...skipping 10 matching lines...) Expand all
21 EXPECT_EQ(static_cast<int>(getpid()), OS::GetCurrentProcessId()); 21 EXPECT_EQ(static_cast<int>(getpid()), OS::GetCurrentProcessId());
22 #endif 22 #endif
23 23
24 #if V8_OS_WIN 24 #if V8_OS_WIN
25 EXPECT_EQ(static_cast<int>(::GetCurrentProcessId()), 25 EXPECT_EQ(static_cast<int>(::GetCurrentProcessId()),
26 OS::GetCurrentProcessId()); 26 OS::GetCurrentProcessId());
27 #endif 27 #endif
28 } 28 }
29 29
30 30
31 TEST(OS, NumberOfProcessorsOnline) {
32 EXPECT_GT(OS::NumberOfProcessorsOnline(), 0);
33 }
34
35
36 namespace { 31 namespace {
37 32
38 class SelfJoinThread V8_FINAL : public Thread { 33 class SelfJoinThread V8_FINAL : public Thread {
39 public: 34 public:
40 SelfJoinThread() : Thread(Options("SelfJoinThread")) {} 35 SelfJoinThread() : Thread(Options("SelfJoinThread")) {}
41 virtual void Run() V8_OVERRIDE { Join(); } 36 virtual void Run() V8_OVERRIDE { Join(); }
42 }; 37 };
43 38
44 } 39 }
45 40
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 101
107 102
108 TEST_F(ThreadLocalStorageTest, DoTest) { 103 TEST_F(ThreadLocalStorageTest, DoTest) {
109 Run(); 104 Run();
110 Start(); 105 Start();
111 Join(); 106 Join();
112 } 107 }
113 108
114 } // namespace base 109 } // namespace base
115 } // namespace v8 110 } // namespace v8
OLDNEW
« no previous file with comments | « test/base-unittests/base-unittests.gyp ('k') | test/base-unittests/sys-info-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698