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

Unified Diff: test/unittests/base/platform/platform-unittest.cc

Issue 757913002: Fix platform unittests. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/unittests/unittests.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/base/platform/platform-unittest.cc
diff --git a/test/unittests/base/platform/platform-unittest.cc b/test/unittests/base/platform/platform-unittest.cc
index b972d8ab3e65123d451511c249fcb7c48d637ba4..b17a9b9ef49b6c0737b6480af52d2cee09ac86ed 100644
--- a/test/unittests/base/platform/platform-unittest.cc
+++ b/test/unittests/base/platform/platform-unittest.cc
@@ -13,6 +13,12 @@
#endif
#include "testing/gtest/include/gtest/gtest.h"
+#if V8_OS_ANDROID
+#define DISABLE_ON_ANDROID(Name) DISABLED_##Name
+#else
+#define DISABLE_ON_ANDROID(Name) Name
+#endif
+
namespace v8 {
namespace base {
@@ -33,13 +39,13 @@ namespace {
class SelfJoinThread FINAL : public Thread {
public:
SelfJoinThread() : Thread(Options("SelfJoinThread")) {}
- virtual void Run() OVERRIDE { Join(); }
+ void Run() FINAL { Join(); }
};
} // namespace
-TEST(Thread, SelfJoin) {
+TEST(Thread, DISABLE_ON_ANDROID(SelfJoin)) {
SelfJoinThread thread;
thread.Start();
thread.Join();
@@ -61,7 +67,7 @@ class ThreadLocalStorageTest : public Thread, public ::testing::Test {
}
}
- virtual void Run() FINAL OVERRIDE {
+ void Run() FINAL {
for (size_t i = 0; i < arraysize(keys_); i++) {
CHECK(!Thread::HasThreadLocal(keys_[i]));
}
@@ -91,16 +97,12 @@ class ThreadLocalStorageTest : public Thread, public ::testing::Test {
private:
static void* GetValue(size_t x) {
- return reinterpret_cast<void*>(static_cast<uintptr_t>(x + 1));
+ return bit_cast<void*>(static_cast<uintptr_t>(x + 1));
}
-#if defined(ANDROID)
// Older versions of Android have fewer TLS slots (nominally 64, but the
// system uses "about 5 of them" itself).
Thread::LocalStorageKey keys_[32];
-#else
- Thread::LocalStorageKey keys_[256];
-#endif
};
} // namespace
« no previous file with comments | « no previous file | test/unittests/unittests.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698