| Index: test/unittests/heap/slot-set-unittest.cc
|
| diff --git a/test/unittests/heap/slot-set-unittest.cc b/test/unittests/heap/slot-set-unittest.cc
|
| index 8db5b1a8fd2ac10bdf1a47d2fceb694b5f662bf8..9bf85071a655dbd106840fe66f94574b3c9a6ace 100644
|
| --- a/test/unittests/heap/slot-set-unittest.cc
|
| +++ b/test/unittests/heap/slot-set-unittest.cc
|
| @@ -152,29 +152,24 @@
|
| ++added;
|
| }
|
| int iterated = 0;
|
| - set.Iterate(
|
| - [&iterated, kDelta, kHostDelta](SlotType type, Address host_addr,
|
| - Address addr) {
|
| - uint32_t i = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr));
|
| - uint32_t j =
|
| - static_cast<uint32_t>(reinterpret_cast<uintptr_t>(host_addr));
|
| - EXPECT_EQ(i % CLEARED_SLOT, static_cast<uint32_t>(type));
|
| - EXPECT_EQ(0, i % kDelta);
|
| - EXPECT_EQ(0, j % kHostDelta);
|
| - ++iterated;
|
| - return i % 2 == 0 ? KEEP_SLOT : REMOVE_SLOT;
|
| - },
|
| - TypedSlotSet::KEEP_EMPTY_CHUNKS);
|
| + set.Iterate([&iterated, kDelta, kHostDelta](SlotType type, Address host_addr,
|
| + Address addr) {
|
| + uint32_t i = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr));
|
| + uint32_t j = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(host_addr));
|
| + EXPECT_EQ(i % CLEARED_SLOT, static_cast<uint32_t>(type));
|
| + EXPECT_EQ(0, i % kDelta);
|
| + EXPECT_EQ(0, j % kHostDelta);
|
| + ++iterated;
|
| + return i % 2 == 0 ? KEEP_SLOT : REMOVE_SLOT;
|
| + });
|
| EXPECT_EQ(added, iterated);
|
| iterated = 0;
|
| - set.Iterate(
|
| - [&iterated](SlotType type, Address host_addr, Address addr) {
|
| - uint32_t i = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr));
|
| - EXPECT_EQ(0, i % 2);
|
| - ++iterated;
|
| - return KEEP_SLOT;
|
| - },
|
| - TypedSlotSet::KEEP_EMPTY_CHUNKS);
|
| + set.Iterate([&iterated](SlotType type, Address host_addr, Address addr) {
|
| + uint32_t i = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr));
|
| + EXPECT_EQ(0, i % 2);
|
| + ++iterated;
|
| + return KEEP_SLOT;
|
| + });
|
| EXPECT_EQ(added / 2, iterated);
|
| }
|
|
|
|
|