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

Unified Diff: third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp

Issue 2512593002: Move wtf/BitwiseOperations.h into base/bits.h. (Closed)
Patch Set: Add a TODO. Created 4 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 | « third_party/WebKit/Source/wtf/allocator/PartitionAlloc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
diff --git a/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp b/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
index 7e056d03c090d4092c9eb5190b6718fd85dc362f..589d6e90d287341045e860752543924ae7a8506d 100644
--- a/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
+++ b/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
@@ -2113,30 +2113,6 @@ TEST(PartitionAllocTest, PurgeDiscardable) {
TestShutdown();
}
-// Tests that the countLeadingZeros() functions work to our satisfaction.
-// It doesn't seem worth the overhead of a whole new file for these tests, so
-// we'll put them here since partitionAllocGeneric will depend heavily on these
-// functions working correctly.
-TEST(PartitionAllocTest, CLZWorks) {
- EXPECT_EQ(32u, countLeadingZeros32(0u));
- EXPECT_EQ(31u, countLeadingZeros32(1u));
- EXPECT_EQ(1u, countLeadingZeros32(1u << 30));
- EXPECT_EQ(0u, countLeadingZeros32(1u << 31));
-
-#if CPU(64BIT)
- EXPECT_EQ(64u, countLeadingZerosSizet(0ull));
- EXPECT_EQ(63u, countLeadingZerosSizet(1ull));
- EXPECT_EQ(32u, countLeadingZerosSizet(1ull << 31));
- EXPECT_EQ(1u, countLeadingZerosSizet(1ull << 62));
- EXPECT_EQ(0u, countLeadingZerosSizet(1ull << 63));
-#else
- EXPECT_EQ(32u, countLeadingZerosSizet(0u));
- EXPECT_EQ(31u, countLeadingZerosSizet(1u));
- EXPECT_EQ(1u, countLeadingZerosSizet(1u << 30));
- EXPECT_EQ(0u, countLeadingZerosSizet(1u << 31));
-#endif
-}
-
} // namespace WTF
#endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
« no previous file with comments | « third_party/WebKit/Source/wtf/allocator/PartitionAlloc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698