[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.
This commit is contained in:
Benjamin Kramer 2020-10-26 18:10:56 +01:00
parent 85e2af7ffe
commit dd7095f52b
1 changed files with 2 additions and 2 deletions

View File

@ -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
}