[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 rL323684: [clang-format] Add more tests for ObjC protocol list formatting behavior (authored by benhamilton, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D42649

Files:
  cfe/trunk/unittests/Format/FormatTestObjC.cpp


Index: cfe/trunk/unittests/Format/FormatTestObjC.cpp
===================================================================
--- cfe/trunk/unittests/Format/FormatTestObjC.cpp
+++ cfe/trunk/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.131839.patch
Type: text/x-patch
Size: 923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180129/d7bf9360/attachment.bin>


More information about the cfe-commits mailing list