owenpan added a comment.

We can refactor by extending `_verifyFormat()` instead of adding a new function.



================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:46
                             const FormatStyle &Style = getLLVMStyle(),
                             llvm::StringRef ExpectedCode = "") {
     ::testing::ScopedTrace t(File, Line, ::testing::Message() << Code.str());
----------------



================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:54
 
     FormatStyle InverseStyle = Style;
     if (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always)
----------------



================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:64
         << "Inverse formatting makes no difference";
     std::string CodeToFormat =
         HasOriginalCode ? Code.str() : removeEmptyLines(Code);
----------------



================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:476
+  Style.SeparateDefinitionBlocks = FormatStyle::SDS_Always;
+  verifyFormatNoInverse("void FunctionWithInternalTry()\n"
+                        "{\n"
----------------



================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:486
+                        "}",
+                        Style);
+  verifyFormatNoInverse("void FunctionWithTryBlock()\n"
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122468/new/

https://reviews.llvm.org/D122468

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to