From: Benjamin Kramer Date: Mon, 26 Oct 2020 17:10:56 +0000 (+0100) Subject: [clang][unittest] Don't hardcode the string "Assertion" X-Git-Tag: llvmorg-13-init~8154 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd7095f52bda36e0f3cd37574a1cb97c7a46cffe;p=platform%2Fupstream%2Fllvm.git [clang][unittest] Don't hardcode the string "Assertion" This depends on the libc implementation. Use the string from the assertion message instead. Overly specific, but so is this entire test. --- diff --git a/clang/unittests/Basic/LineOffsetMappingTest.cpp b/clang/unittests/Basic/LineOffsetMappingTest.cpp index e040813..b50374a 100644 --- a/clang/unittests/Basic/LineOffsetMappingTest.cpp +++ b/clang/unittests/Basic/LineOffsetMappingTest.cpp @@ -20,7 +20,7 @@ TEST(LineOffsetMappingTest, empty) { EXPECT_FALSE(Mapping); #if !defined(NDEBUG) && GTEST_HAS_DEATH_TEST - EXPECT_DEATH((void)Mapping.getLines(), "Assertion"); + EXPECT_DEATH((void)Mapping.getLines(), "Storage"); #endif } @@ -34,7 +34,7 @@ TEST(LineOffsetMappingTest, construct) { EXPECT_EQ(20u, Mapping[2]); #if !defined(NDEBUG) && GTEST_HAS_DEATH_TEST - EXPECT_DEATH((void)Mapping[3], "Assertion"); + EXPECT_DEATH((void)Mapping[3], "Invalid index"); #endif }