aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2022-03-21 18:30:35 -0700
committerPetr Hosek <phosek@google.com>2022-06-27 23:09:37 -0700
commitd1b098fc825176242afee12b8f9dc14adf5eec51 (patch)
treeddf48af65ac5122c614f1ba006a45ecf7a4e0513 /llvm/unittests/ProfileData/CoverageMappingTest.cpp
parentfa596c6921159af50e69cc3be189d951521a9eb9 (diff)
downloadllvm-d1b098fc825176242afee12b8f9dc14adf5eec51.zip
llvm-d1b098fc825176242afee12b8f9dc14adf5eec51.tar.gz
llvm-d1b098fc825176242afee12b8f9dc14adf5eec51.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/D122750
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
-rw-r--r--llvm/unittests/ProfileData/CoverageMappingTest.cpp4
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);
}
}
}