[PATCH] D42649: [clang-format] Add more tests for ObjC protocol list formatting behavior

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 29 12:03:41 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC323684: [clang-format] Add more tests for ObjC protocol list formatting behavior (authored by benhamilton, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D42649?vs=131821&id=131840#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42649

Files:
  unittests/Format/FormatTestObjC.cpp


Index: unittests/Format/FormatTestObjC.cpp
===================================================================
--- unittests/Format/FormatTestObjC.cpp
+++ unittests/Format/FormatTestObjC.cpp
@@ -276,6 +276,20 @@
                "+ (id)init;\n"
                "@end");
 
+  Style.ColumnLimit = 40;
+  verifyFormat("@interface ccccccccccccc () <\n"
+               "    ccccccccccccc, ccccccccccccc,\n"
+               "    ccccccccccccc, ccccccccccccc> {\n"
+               "}");
+
+  Style.BinPackParameters = false;
+  verifyFormat("@interface ddddddddddddd () <\n"
+               "    ddddddddddddd,\n"
+               "    ddddddddddddd,\n"
+               "    ddddddddddddd,\n"
+               "    ddddddddddddd> {\n"
+               "}");
+
   Style = getGoogleStyle(FormatStyle::LK_ObjC);
   verifyFormat("@interface Foo : NSObject <NSSomeDelegate> {\n"
                " @public\n"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42649.131840.patch
Type: text/x-patch
Size: 893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180129/f5fcc8c1/attachment.bin>


More information about the cfe-commits mailing list