================ @@ -17,80 +17,97 @@ namespace clang { namespace format { namespace { +std::string +separateDefinitionBlocks(llvm::StringRef Code, + const std::vector<tooling::Range> &Ranges, + const FormatStyle &Style = getLLVMStyle()) { + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); + tooling::Replacements Replaces = reformat(Style, Code, Ranges, "<stdin>"); + auto Result = applyAllReplacements(Code, Replaces); + EXPECT_TRUE(static_cast<bool>(Result)); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + return *Result; +} -class DefinitionBlockSeparatorTest : public ::testing::Test { ---------------- HazardyKnusperkeks wrote:
Okay, this one I'd really like to be pulled out. And I'd want to hear from @owenca or @mydeveloperday. I'm not so fit in gtest, I can't say if we want this, or not. https://github.com/llvm/llvm-project/pull/77918 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits