aboutsummaryrefslogtreecommitdiff
path: root/src/decoder/test/integer_sequence_codec_test.cc
diff options
context:
space:
mode:
authorGravatar Jeff McGlynn <jwmcglynn@google.com>2018-08-16 16:53:26 -0700
committerGravatar Jeff McGlynn <jwmcglynn@google.com>2018-08-16 18:13:43 -0700
commit16661ba8c0103c2571e84a59a107c9e41dbe60dc (patch)
tree954429f1e6f9f558f62bcc541f7db8a9b1e38f45 /src/decoder/test/integer_sequence_codec_test.cc
parent06beed61ea806970a8c6023daf20436c2e65f25d (diff)
Fix ASAN failures in integer_sequence_codec and partition
Introduce UTILS_RELEASE_ASSERT, which crashes if the condition isn't met, even on release builds. Update integer_sequence_codec and partition to use the new tests to validate input parameters, and update the tests so that they expect the crash to occur even on release builds. Bug: 112691516, 112669735 Change-Id: Ic82edeffc64ca0f2b0d17f1c63563dfd8d9cdd71
Diffstat (limited to 'src/decoder/test/integer_sequence_codec_test.cc')
-rw-r--r--src/decoder/test/integer_sequence_codec_test.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/decoder/test/integer_sequence_codec_test.cc b/src/decoder/test/integer_sequence_codec_test.cc
index b66ff2b..120e8b0 100644
--- a/src/decoder/test/integer_sequence_codec_test.cc
+++ b/src/decoder/test/integer_sequence_codec_test.cc
@@ -74,9 +74,8 @@ TEST(ASTCIntegerSequenceCodecTest, TestGetCountsForRange) {
EXPECT_EQ(b, kExpectedCounts[i - 1][2]);
}
- ASSERT_DEBUG_DEATH(IntegerSequenceCodec::GetCountsForRange(0, &t, &q, &b), "");
- ASSERT_DEBUG_DEATH(
- IntegerSequenceCodec::GetCountsForRange(256, &t, &q, &b), "");
+ ASSERT_DEATH(IntegerSequenceCodec::GetCountsForRange(0, &t, &q, &b), "");
+ ASSERT_DEATH(IntegerSequenceCodec::GetCountsForRange(256, &t, &q, &b), "");
IntegerSequenceCodec::GetCountsForRange(1, &t, &q, &b);
EXPECT_EQ(t, 0);