=?utf-8?q?Björn_Schäpers?= <[email protected]>,
=?utf-8?q?Björn_Schäpers?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -4218,485 +4217,277 @@ TEST_F(FormatTestComments, SpaceAtLineCommentBegin) {
                        "void f() {//Hello World\n"
                        "}";
 
-  EXPECT_EQ("// Lorem ipsum dolor\n"
-            "// sit amet\n"
-            "\n"
-            "//  Lorem   ipsum\n"
-            "//  dolor   sit amet\n"
-            "\n"
-            "void f() { // Hello\n"
-            "           // World\n"
-            "}",
-            format(WrapCode, Style));
+  verifyFormat("// Lorem ipsum dolor\n"
+               "// sit amet\n"
+               "\n"
+               "//  Lorem   ipsum\n"
+               "//  dolor   sit amet\n"
+               "\n"
+               "void f() { // Hello\n"
+               "           // World\n"
+               "}",
+               WrapCode, Style);
 
   Style.SpacesInLineCommentPrefix = {0, 0};
-  EXPECT_EQ("//Lorem ipsum dolor\n"
-            "//sit amet\n"
-            "\n"
-            "//Lorem   ipsum\n"
-            "//dolor   sit   amet\n"
-            "\n"
-            "void f() { //Hello\n"
-            "           //World\n"
-            "}",
-            format(WrapCode, Style));
+  verifyFormat("//Lorem ipsum dolor\n"
+               "//sit amet\n"
+               "\n"
+               "//Lorem   ipsum\n"
+               "//dolor   sit   amet\n"
+               "\n"
+               "void f() { //Hello\n"
+               "           //World\n"
+               "}",
+               WrapCode, Style);
 
   Style.SpacesInLineCommentPrefix = {1, 1};
-  EXPECT_EQ("// Lorem ipsum dolor\n"
-            "// sit amet\n"
-            "\n"
-            "// Lorem   ipsum\n"
-            "// dolor   sit amet\n"
-            "\n"
-            "void f() { // Hello\n"
-            "           // World\n"
-            "}",
-            format(WrapCode, Style));
-  EXPECT_EQ("// x\n"
-            "// y",
-            format("//   x\n"
-                   "// y",
-                   Style));
-  EXPECT_EQ(
+  verifyFormat("// Lorem ipsum dolor\n"
+               "// sit amet\n"
+               "\n"
+               "// Lorem   ipsum\n"
+               "// dolor   sit amet\n"
+               "\n"
+               "void f() { // Hello\n"
+               "           // World\n"
+               "}",
+               WrapCode, Style);
+  verifyFormat("// x\n"
+               "// y",
+               "//   x\n"
+               "// y",
+               Style);
+  verifyFormat(
       "// loooooooooooooooooooooooooooooong\n"
       "// commentcomments\n"
       "// normal comments",
-      format("//            loooooooooooooooooooooooooooooong 
commentcomments\n"
-             "// normal comments",
-             Style));
+      "//            loooooooooooooooooooooooooooooong commentcomments\n"
+      "// normal comments",
+      Style);
 
   Style.SpacesInLineCommentPrefix = {3, 3};
-  EXPECT_EQ("//   Lorem ipsum\n"
-            "//   dolor sit amet\n"
-            "\n"
-            "//   Lorem   ipsum\n"
-            "//   dolor   sit\n"
-            "//   amet\n"
-            "\n"
-            "void f() { //   Hello\n"
-            "           //   World\n"
-            "}",
-            format(WrapCode, Style));
+  verifyFormat("//   Lorem ipsum\n"
+               "//   dolor sit amet\n"
+               "\n"
+               "//   Lorem   ipsum\n"
+               "//   dolor   sit\n"
+               "//   amet\n"
+               "\n"
+               "void f() { //   Hello\n"
+               "           //   World\n"
+               "}",
+               WrapCode, Style);
 
   Style = getLLVMStyleWithColumns(20);
-  StringRef LotsOfSpaces = "//                      This are more spaces "
-                           "than the ColumnLimit, what now?\n"
-                           "\n"
-                           "//   Comment\n"
-                           "\n"
-                           "// This is a text to split in multiple "
-                           "lines, please. Thank you very much!\n"
-                           "\n"
-                           "// A comment with\n"
-                           "//   some indentation that has to be split.\n"
-                           "// And now without";
-  EXPECT_EQ("//                      This are more spaces "
-            "than the ColumnLimit, what now?\n"
-            "\n"
-            "//   Comment\n"
-            "\n"
-            "// This is a text to\n"
-            "// split in multiple\n"
-            "// lines, please.\n"
-            "// Thank you very\n"
-            "// much!\n"
-            "\n"
-            "// A comment with\n"
-            "//   some\n"
-            "//   indentation\n"
-            "//   that has to be\n"
-            "//   split.\n"
-            "// And now without",
-            format(LotsOfSpaces, Style));
+  constexpr StringRef LotsOfSpaces =
----------------
owenca wrote:

```suggestion
  constexpr StringRef LotsOfSpaces(
```

https://github.com/llvm/llvm-project/pull/164310
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to