diff options
author | Petr Hosek <phosek@google.com> | 2022-03-21 18:30:35 -0700 |
---|---|---|
committer | Petr Hosek <phosek@google.com> | 2022-06-28 20:53:01 -0700 |
commit | 0204fd25b0ca9a7bc7db11df238d8ec9f195e67c (patch) | |
tree | 19f2e7aecc89e19543dc1a5a2282cbc0da87123f /llvm/unittests/ProfileData/CoverageMappingTest.cpp | |
parent | 779d2470a45393b981eff706662922f320859681 (diff) | |
download | llvm-0204fd25b0ca9a7bc7db11df238d8ec9f195e67c.zip llvm-0204fd25b0ca9a7bc7db11df238d8ec9f195e67c.tar.gz llvm-0204fd25b0ca9a7bc7db11df238d8ec9f195e67c.tar.bz2 |
[CoverageMapping] Remove dots from paths inside the profile
We already remove dots from collected paths and path mappings. This
makes it difficult to match paths inside the profile which contain
dots. For example, we would never match /path/to/../file.c because
the collected path is always be normalized to /path/file.c. This
change enables dot removal for paths inside the profile to address
the issue.
Differential Revision: https://reviews.llvm.org/D123164
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/CoverageMappingTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp index cc4c953..758398d 100644 --- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp +++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp @@ -943,7 +943,7 @@ TEST(CoverageMappingTest, filename_roundtrip) { for (unsigned I = 1; I < Paths.size(); ++I) { SmallString<256> P(Paths[0]); llvm::sys::path::append(P, Paths[I]); - ASSERT_TRUE(ReadFilenames[I] == P); + ASSERT_EQ(ReadFilenames[I], P); } } } @@ -969,7 +969,7 @@ TEST(CoverageMappingTest, filename_compilation_dir) { for (unsigned I = 1; I < Paths.size(); ++I) { SmallString<256> P(CompilationDir); llvm::sys::path::append(P, Paths[I]); - ASSERT_TRUE(ReadFilenames[I] == P); + ASSERT_EQ(ReadFilenames[I], P); } } } |