Commit 35c21ba3 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

cppgc: Fix compilation of death tests on iOS

iOS does not support death tests.

Bug: v8:10360
Change-Id: Ia86553d53eee811e5521c093fd034115a9d01750
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2128046
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66912}
parent 58b543ab
...@@ -40,7 +40,7 @@ TEST(GCInfoTableDeathTest, MoreThanMaxIndexInfos) { ...@@ -40,7 +40,7 @@ TEST(GCInfoTableDeathTest, MoreThanMaxIndexInfos) {
i++) { i++) {
table.RegisterNewGCInfo(info); table.RegisterNewGCInfo(info);
} }
EXPECT_DEATH(table.RegisterNewGCInfo(info), ""); EXPECT_DEATH_IF_SUPPORTED(table.RegisterNewGCInfo(info), "");
} }
TEST(GCInfoTableDeathTest, OldTableAreaIsReadOnly) { TEST(GCInfoTableDeathTest, OldTableAreaIsReadOnly) {
...@@ -62,7 +62,7 @@ TEST(GCInfoTableDeathTest, OldTableAreaIsReadOnly) { ...@@ -62,7 +62,7 @@ TEST(GCInfoTableDeathTest, OldTableAreaIsReadOnly) {
EXPECT_NE(limit, table.LimitForTesting()); EXPECT_NE(limit, table.LimitForTesting());
// Old area is now read-only. // Old area is now read-only.
auto& first_slot = table.TableSlotForTesting(GCInfoTable::kMinIndex); auto& first_slot = table.TableSlotForTesting(GCInfoTable::kMinIndex);
EXPECT_DEATH(first_slot.finalize = nullptr, ""); EXPECT_DEATH_IF_SUPPORTED(first_slot.finalize = nullptr, "");
} }
namespace { namespace {
......
...@@ -166,13 +166,13 @@ TEST(HeapObjectHeaderTest, ConstructionBitProtectsNonAtomicWrites) { ...@@ -166,13 +166,13 @@ TEST(HeapObjectHeaderTest, ConstructionBitProtectsNonAtomicWrites) {
TEST(HeapObjectHeaderDeathTest, ConstructorTooLargeSize) { TEST(HeapObjectHeaderDeathTest, ConstructorTooLargeSize) {
constexpr GCInfoIndex kGCInfoIndex = 17; constexpr GCInfoIndex kGCInfoIndex = 17;
constexpr size_t kSize = HeapObjectHeader::kMaxSize + 1; constexpr size_t kSize = HeapObjectHeader::kMaxSize + 1;
EXPECT_DEATH(HeapObjectHeader header(kSize, kGCInfoIndex), ""); EXPECT_DEATH_IF_SUPPORTED(HeapObjectHeader header(kSize, kGCInfoIndex), "");
} }
TEST(HeapObjectHeaderDeathTest, ConstructorTooLargeGCInfoIndex) { TEST(HeapObjectHeaderDeathTest, ConstructorTooLargeGCInfoIndex) {
constexpr GCInfoIndex kGCInfoIndex = GCInfoTable::kMaxIndex + 1; constexpr GCInfoIndex kGCInfoIndex = GCInfoTable::kMaxIndex + 1;
constexpr size_t kSize = kAllocationGranularity; constexpr size_t kSize = kAllocationGranularity;
EXPECT_DEATH(HeapObjectHeader header(kSize, kGCInfoIndex), ""); EXPECT_DEATH_IF_SUPPORTED(HeapObjectHeader header(kSize, kGCInfoIndex), "");
} }
#endif // DEBUG #endif // DEBUG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment