diff --git a/clang-tools-extra/clangd/unittests/RenameTests.cpp b/clang-tools-extra/clangd/unittests/RenameTests.cpp --- a/clang-tools-extra/clangd/unittests/RenameTests.cpp +++ b/clang-tools-extra/clangd/unittests/RenameTests.cpp @@ -442,6 +442,7 @@ )cpp", }; for (llvm::StringRef T : Tests) { + SCOPED_TRACE(T); Annotations Code(T); auto TU = TestTU::withCode(Code.code()); TU.ExtraArgs.push_back("-fno-delayed-template-parsing"); @@ -560,6 +561,7 @@ }; for (const auto& Case : Cases) { + SCOPED_TRACE(Case.Code); Annotations T(Case.Code); TestTU TU = TestTU::withCode(T.code()); TU.HeaderCode = CommonHeader; @@ -886,6 +888,7 @@ }; for (const auto& T : Cases) { + SCOPED_TRACE(T.FooH); Annotations FooH(T.FooH); Annotations FooCC(T.FooCC); std::string FooHPath = testPath("foo.h"); @@ -1012,6 +1015,7 @@ LangOptions LangOpts; LangOpts.CPlusPlus = true; for (const auto &T : Tests) { + SCOPED_TRACE(T.DraftCode); Annotations Draft(T.DraftCode); auto ActualRanges = adjustRenameRanges( Draft.code(), "x", Annotations(T.IndexedCode).ranges(), LangOpts); @@ -1019,8 +1023,7 @@ EXPECT_THAT(Draft.ranges(), testing::IsEmpty()); else EXPECT_THAT(Draft.ranges(), - testing::UnorderedElementsAreArray(*ActualRanges)) - << T.DraftCode; + testing::UnorderedElementsAreArray(*ActualRanges)); } } @@ -1127,6 +1130,7 @@ } }; for (const auto &T : Tests) { + SCOPED_TRACE(T.IndexedCode); auto Lexed = Annotations(T.LexedCode); auto LexedRanges = Lexed.ranges(); std::vector ExpectedMatches; @@ -1143,8 +1147,7 @@ if (!Mapped) EXPECT_THAT(ExpectedMatches, IsEmpty()); else - EXPECT_THAT(ExpectedMatches, UnorderedElementsAreArray(*Mapped)) - << T.IndexedCode; + EXPECT_THAT(ExpectedMatches, UnorderedElementsAreArray(*Mapped)); } } @@ -1247,13 +1250,14 @@ }, }; for (const auto &T : Tests) { + SCOPED_TRACE(T.RangeCode); Annotations C(T.RangeCode); std::vector MappedIndex; for (size_t I = 0; I < C.ranges("lex").size(); ++I) MappedIndex.push_back(I); EXPECT_EQ(renameRangeAdjustmentCost(C.ranges("idx"), C.ranges("lex"), MappedIndex), - T.ExpectedCost) << T.RangeCode; + T.ExpectedCost); } }