================
@@ -610,6 +626,113 @@ TEST_F(DefinitionBlockSeparatorTest, JavaScript) {
                "}",
                Style);
 }
+
+TEST_P(LicenseTest, SeparateLicenseFromBlock) {
+  constexpr StringRef LicenseSingleLineCommentStyle = {"// start license\n"
+                                                       "// license text\n"
+                                                       "// more license text\n"
+                                                       "// end license\n"};
+  constexpr StringRef LicenseMultipleLineCommentStyle{"/*\n"
+                                                      "start license\n"
+                                                      "license text\n"
+                                                      "more license text\n"
+                                                      "end license */\n"};
+
+  const auto Block = GetParam();
+  FormatStyle Style = getLLVMStyle();
+  Style.SeparateDefinitionBlocks = FormatStyle::SDS_One;
+  Style.MaxEmptyLinesToKeep = 2;
+  verifyFormat(LicenseSingleLineCommentStyle.str() + "\n" + Block, Style);
----------------
mydeveloperday wrote:

Can we not write the test like this, I'm sorry but I think its so much more 
readable to say it all out in the verifyFormat

```c++
veryformat("// start license
                   ....., Style);
```

I don't want to have to run a debugger to understand the text thats being 
passed to verifyFormat I want to see it verbatum

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

Reply via email to