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

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

Issue 735863003: Fix/suppress unittests broken on Android (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/unittests/unittests.status » ('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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 CHECK_EQ(GetValue(arraysize(keys_) - i - 1), 87 CHECK_EQ(GetValue(arraysize(keys_) - i - 1),
88 Thread::GetExistingThreadLocal(keys_[i])); 88 Thread::GetExistingThreadLocal(keys_[i]));
89 } 89 }
90 } 90 }
91 91
92 private: 92 private:
93 static void* GetValue(size_t x) { 93 static void* GetValue(size_t x) {
94 return reinterpret_cast<void*>(static_cast<uintptr_t>(x + 1)); 94 return reinterpret_cast<void*>(static_cast<uintptr_t>(x + 1));
95 } 95 }
96 96
97 #if defined(ANDROID)
98 // Older versions of Android have fewer TLS slots (nominally 64, but the
99 // system uses "about 5 of them" itself).
100 Thread::LocalStorageKey keys_[32];
101 #else
97 Thread::LocalStorageKey keys_[256]; 102 Thread::LocalStorageKey keys_[256];
103 #endif
98 }; 104 };
99 105
100 } // namespace 106 } // namespace
101 107
102 108
103 TEST_F(ThreadLocalStorageTest, DoTest) { 109 TEST_F(ThreadLocalStorageTest, DoTest) {
104 Run(); 110 Run();
105 Start(); 111 Start();
106 Join(); 112 Join();
107 } 113 }
108 114
109 } // namespace base 115 } // namespace base
110 } // namespace v8 116 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/unittests/unittests.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698