Skip to content

Commit

Permalink
[clang][unittest] Don't hardcode the string "Assertion"
Browse files Browse the repository at this point in the history
This depends on the libc implementation. Use the string from the
assertion message instead. Overly specific, but so is this entire test.
  • Loading branch information
d0k committed Oct 26, 2020
1 parent 85e2af7 commit dd7095f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/unittests/Basic/LineOffsetMappingTest.cpp
Expand Up @@ -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
}

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

Expand Down

0 comments on commit dd7095f

Please sign in to comment.