Commit f5bfcb81 authored by Dominik Röttsches's avatar Dominik Röttsches Committed by Commit Bot

Expect death checks to pass only on DCHECK enabled builds

Speculative fix for issue 1128434. The mac-arm64 build may be
built without DCHECK on, which could be the explanations for
why these tests are not actually failing.

Bug: 1128434
Change-Id: I1ca705c1429847dde587e6f69e66f22cbbdad59b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438050
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811659}
parent 55c10a47
......@@ -105,9 +105,11 @@ TEST(UTF16RagelIteratorTest, ArithmeticOperators) {
TEST(UTF16RagelIteratorTest, InvalidOperationOnEmpty) {
UTF16RagelIterator ragel_iterator;
CHECK_EQ(ragel_iterator.Cursor(), 0u);
#if DCHECK_IS_ON()
EXPECT_DEATH_IF_SUPPORTED(ragel_iterator++, "");
EXPECT_DEATH_IF_SUPPORTED(ragel_iterator--, "");
EXPECT_DEATH_IF_SUPPORTED(*ragel_iterator, "");
#endif
}
TEST(UTF16RagelIteratorTest, CursorPositioning) {
......@@ -128,9 +130,11 @@ TEST(UTF16RagelIteratorTest, CursorPositioning) {
CHECK_EQ(*(ragel_iterator.SetCursor(6)),
UTF16RagelIterator::EMOJI_TEXT_PRESENTATION);
#if DCHECK_IS_ON()
EXPECT_DEATH_IF_SUPPORTED(ragel_iterator.SetCursor(-1), "");
EXPECT_DEATH_IF_SUPPORTED(
ragel_iterator.SetCursor(ragel_iterator.end().Cursor()), "");
#endif
}
} // namespace blink
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