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

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

Issue 462033002: Fix newly discovered presubmit errors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More of the same. 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/base-unittests/platform/condition-variable-unittest.cc ('k') | test/cctest/cctest.h » ('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 19 matching lines...) Expand all
30 30
31 TEST(OS, NumberOfProcessorsOnline) { 31 TEST(OS, NumberOfProcessorsOnline) {
32 EXPECT_GT(OS::NumberOfProcessorsOnline(), 0); 32 EXPECT_GT(OS::NumberOfProcessorsOnline(), 0);
33 } 33 }
34 34
35 35
36 namespace { 36 namespace {
37 37
38 class SelfJoinThread V8_FINAL : public Thread { 38 class SelfJoinThread V8_FINAL : public Thread {
39 public: 39 public:
40 SelfJoinThread() : Thread("SelfJoinThread") {} 40 SelfJoinThread() : Thread(Options("SelfJoinThread")) {}
41 virtual void Run() V8_OVERRIDE { Join(); } 41 virtual void Run() V8_OVERRIDE { Join(); }
42 }; 42 };
43 43
44 } 44 }
45 45
46 46
47 TEST(Thread, SelfJoin) { 47 TEST(Thread, SelfJoin) {
48 SelfJoinThread thread; 48 SelfJoinThread thread;
49 thread.Start(); 49 thread.Start();
50 thread.Join(); 50 thread.Join();
51 } 51 }
52 52
53 53
54 namespace { 54 namespace {
55 55
56 class ThreadLocalStorageTest : public Thread, public ::testing::Test { 56 class ThreadLocalStorageTest : public Thread, public ::testing::Test {
57 public: 57 public:
58 ThreadLocalStorageTest() : Thread("ThreadLocalStorageTest") { 58 ThreadLocalStorageTest() : Thread(Options("ThreadLocalStorageTest")) {
59 for (size_t i = 0; i < ARRAY_SIZE(keys_); ++i) { 59 for (size_t i = 0; i < ARRAY_SIZE(keys_); ++i) {
60 keys_[i] = Thread::CreateThreadLocalKey(); 60 keys_[i] = Thread::CreateThreadLocalKey();
61 } 61 }
62 } 62 }
63 ~ThreadLocalStorageTest() { 63 ~ThreadLocalStorageTest() {
64 for (size_t i = 0; i < ARRAY_SIZE(keys_); ++i) { 64 for (size_t i = 0; i < ARRAY_SIZE(keys_); ++i) {
65 Thread::DeleteThreadLocalKey(keys_[i]); 65 Thread::DeleteThreadLocalKey(keys_[i]);
66 } 66 }
67 } 67 }
68 68
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 107
108 TEST_F(ThreadLocalStorageTest, DoTest) { 108 TEST_F(ThreadLocalStorageTest, DoTest) {
109 Run(); 109 Run();
110 Start(); 110 Start();
111 Join(); 111 Join();
112 } 112 }
113 113
114 } // namespace base 114 } // namespace base
115 } // namespace v8 115 } // namespace v8
OLDNEW
« no previous file with comments | « test/base-unittests/platform/condition-variable-unittest.cc ('k') | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698