Lines Matching full:n

56   verifyFormat("#include \"a.h\"\n"
57 "#include \"b.h\"\n"
59 sort("#include \"a.h\"\n"
60 "#include \"c.h\"\n"
63 verifyFormat("// comment\n"
64 "#include <a>\n"
66 sort("// comment\n"
67 "#include <b>\n"
73 verifyFormat("#include \"a.h\"\n"
74 "#include \"b.h\" /* long\n"
75 " * long\n"
76 " * comment*/\n"
77 "#include \"c.h\"\n"
79 sort("#include \"a.h\"\n"
80 "#include \"c.h\"\n"
81 "#include \"b.h\" /* long\n"
82 " * long\n"
83 " * comment*/\n"
103 verifyFormat("#include <sys/param.h>\n"
104 "#include <sys/types.h>\n"
105 "#include <sys/ioctl.h>\n"
106 "#include <sys/socket.h>\n"
107 "#include <sys/stat.h>\n"
108 "#include <sys/wait.h>\n"
109 "\n"
110 "#include <net/if.h>\n"
111 "#include <net/if_dl.h>\n"
112 "#include <net/route.h>\n"
113 "#include <netinet/in.h>\n"
114 "#include <protocols/rwhod.h>\n"
115 "\n"
116 "#include <assert.h>\n"
117 "#include <errno.h>\n"
118 "#include <inttypes.h>\n"
119 "#include <stdio.h>\n"
120 "#include <stdlib.h>\n"
121 "\n"
122 "#include <paths.h>\n"
123 "\n"
125 sort("#include <sys/param.h>\n"
126 "#include <sys/types.h>\n"
127 "#include <sys/ioctl.h>\n"
128 "#include <net/if_dl.h>\n"
129 "#include <net/route.h>\n"
130 "#include <netinet/in.h>\n"
131 "#include <sys/socket.h>\n"
132 "#include <sys/stat.h>\n"
133 "#include <sys/wait.h>\n"
134 "#include <net/if.h>\n"
135 "#include <protocols/rwhod.h>\n"
136 "#include <assert.h>\n"
137 "#include <paths.h>\n"
138 "#include \"pathnames.h\"\n"
139 "#include <errno.h>\n"
140 "#include <inttypes.h>\n"
141 "#include <stdio.h>\n"
146 verifyFormat("#include \"FormatTestUtils.h\"\n"
147 "#include \"clang/Format/Format.h\"\n"
148 "#include \"llvm/ADT/None.h\"\n"
149 "#include \"llvm/Support/Debug.h\"\n"
151 sort("#include \"clang/Format/Format.h\"\n"
152 "#include \"llvm/ADT/None.h\"\n"
153 "#include \"FormatTestUtils.h\"\n"
154 "#include \"gtest/gtest.h\"\n"
160 StringRef Code = "#include <a>\n"
161 "#include <b>\n"
162 "#include <c>\n"
163 "#include <d>\n"
164 "#include <e>\n"
165 "#include <f>\n";
170 StringRef Code = "#include <string>\n"
171 "\n"
172 "#include \"a/extra_action.proto.h\"\n";
178 verifyFormat("#include \"foo.bar.h\"\n"
179 "\n"
181 sort("#include \"a.h\"\n"
188 verifyFormat("#include \"a.h\"\n"
189 "#include \"b.h\"\n"
191 sort("#include \"a.h\"\n"
192 "#include \"c.h\"\n"
193 "\n"
194 "\n"
198 verifyFormat("#include \"a.h\"\n"
199 "#include \"b.h\"\n"
201 sort("#include \"a.h\"\n"
202 "#include \"c.h\"\n"
203 "\n"
204 "\n"
209 verifyFormat("#include <a>\n"
210 "#include <b>\n"
211 "#include <c>\n"
212 "// clang-format off\n"
213 "#include <b>\n"
214 "#include <a>\n"
215 "#include <c>\n"
217 sort("#include <b>\n"
218 "#include <a>\n"
219 "#include <c>\n"
220 "// clang-format off\n"
221 "#include <b>\n"
222 "#include <a>\n"
223 "#include <c>\n"
227 StringRef Code = "// clang-format off\r\n"
228 "#include \"d.h\"\r\n"
229 "#include \"b.h\"\r\n"
230 "// clang-format on\r\n"
231 "\r\n"
232 "#include \"c.h\"\r\n"
233 "#include \"a.h\"\r\n"
234 "#include \"e.h\"\r\n";
236 StringRef Expected = "// clang-format off\r\n"
237 "#include \"d.h\"\r\n"
238 "#include \"b.h\"\r\n"
239 "// clang-format on\r\n"
240 "\r\n"
241 "#include \"e.h\"\r\n"
242 "#include \"a.h\"\r\n"
243 "#include \"c.h\"\r\n";
249 verifyFormat("#include <a>\n"
250 "#include <b>\n"
251 "#include <c>\n"
252 "/* clang-format off */\n"
253 "#include <b>\n"
254 "#include <a>\n"
255 "#include <c>\n"
257 sort("#include <b>\n"
258 "#include <a>\n"
259 "#include <c>\n"
260 "/* clang-format off */\n"
261 "#include <b>\n"
262 "#include <a>\n"
263 "#include <c>\n"
267 verifyFormat("#include <a>\n"
268 "#include <b>\n"
269 "#include <c>\n"
270 "/* clang-format offically */\n"
271 "#include <a>\n"
272 "#include <b>\n"
273 "#include <c>\n"
275 sort("#include <b>\n"
276 "#include <a>\n"
277 "#include <c>\n"
278 "/* clang-format offically */\n"
279 "#include <b>\n"
280 "#include <a>\n"
281 "#include <c>\n"
288 verifyFormat("#include \"a.h\"\n"
289 "#include \"c.h\"\n"
291 sort("#include \"a.h\"\n"
292 "#include \"c.h\"\n"
298 verifyFormat("#include \"a.h\"\n"
299 "#import \"b.h\"\n"
301 sort("#include \"a.h\"\n"
302 "#include \"c.h\"\n"
307 verifyFormat("#include \"a.h\" // comment\n"
308 "#include \"bb.h\" // comment\n"
310 sort("#include \"a.h\" // comment\n"
311 "#include \"ccc.h\"\n"
316 verifyFormat("#include \"a.h\"\n"
317 "#include \"b.h\"\n"
319 sort(" #include \"a.h\"\n"
320 " #include \"c.h\"\n"
322 verifyFormat("#include \"a.h\"\n"
323 "#include \"b.h\"\n"
325 sort("# include \"a.h\"\n"
326 "# include \"c.h\"\n"
328 verifyFormat("#include \"a.h\"", sort("#include \"a.h\"\n"
333 verifyFormat("#include \"a.h\"\n"
334 "#include \"b.h\"\n"
336 sort("#include \"a.h\" \n"
337 "#include \"c.h\" \n"
339 verifyFormat("#include \"a.h\"", sort("#include \"a.h\"\n"
344 verifyFormat("#include \"a.h\"\n"
345 "#include \"b.h\" // >\n"
347 sort("#include \"a.h\"\n"
348 "#include \"c.h\"\n"
353 verifyFormat("#include \"a.h\"\n"
354 "#include \"c.h\"\n"
355 "\n"
357 sort("#include \"a.h\"\n"
358 "#include \"c.h\"\n"
359 "\n"
366 verifyFormat("#include \"a.h\"\n"
367 "#include \"b.h\"\n"
369 sort("#include \"a.h\"\n"
370 "#include \"c.h\"\n"
371 "\n"
376 verifyFormat("#include \"a.h\"\n"
377 "#include \"c.h\"\n"
378 "// comment\n"
380 sort("#include \"c.h\"\n"
381 "#include \"a.h\"\n"
382 "// comment\n"
386 verifyFormat("#include \"a.h\"\n"
387 "#include \"c.h\"\n"
388 "// comment\n"
390 sort("#include \"c.h\"\n"
391 "#include \"a.h\"\n"
392 "// comment\n"
396 verifyFormat("#include \"a.h\"\n"
397 "#include \"c.h\"\n"
398 "// comment\n"
400 sort("#include \"c.h\"\n"
401 "#include \"a.h\"\n"
402 "// comment\n"
407 verifyFormat("#include \"a.h\"\n"
408 "#include \"c.h\"\n"
409 "#include <array>\n"
410 "#include <b.h>\n"
411 "#include <d.h>\n"
413 sort("#include <vector>\n"
414 "#include <d.h>\n"
415 "#include <array>\n"
416 "#include <b.h>\n"
417 "#include \"c.h\"\n"
421 verifyFormat("#include <b.h>\n"
422 "#include <d.h>\n"
423 "\n"
424 "#include <array>\n"
425 "#include <vector>\n"
426 "\n"
427 "#include \"a.h\"\n"
429 sort("#include <vector>\n"
430 "#include <d.h>\n"
431 "#include <array>\n"
432 "#include <b.h>\n"
433 "#include \"c.h\"\n"
439 verifyFormat("#include \"a.h\"\n"
440 "#include \"c.h\"\n"
441 "\n"
442 "#include <b.h>\n"
444 sort("#include <d.h>\n"
445 "#include <b.h>\n"
446 "#include \"c.h\"\n"
451 verifyFormat("#include \"a.h\"\n"
452 "#include \"b.h\"\n"
454 sort("#include \"a.h\"\n"
455 "#include \\\n"
456 "\"c.h\"\n"
462 verifyFormat("#include <cstdint>\n"
463 "\n"
464 "#include \"util/bar.h\"\n"
466 sort("#include <cstdint>\n"
467 "\n"
468 "#include \"util/bar.h\"\n"
476 verifyFormat("#include \"llvm/a.h\"\n"
477 "#include \"b.h\"\n"
479 sort("#include \"llvm/a.h\"\n"
480 "#include \"c.h\"\n"
483 verifyFormat("#include \"llvm/a.h\"\n"
484 "#include \"b.h\"\n"
486 sort("#include \"llvm/a.h\"\n"
487 "#include \"c.h\"\n"
490 verifyFormat("#include \"llvm/input.h\"\n"
491 "#include \"b.h\"\n"
493 sort("#include \"llvm/input.h\"\n"
494 "#include \"c.h\"\n"
499 verifyFormat("#include \"b.h\"\n"
500 "#include \"c.h\"\n"
502 sort("#include \"llvm/not_a.h\"\n"
503 "#include \"c.h\"\n"
508 verifyFormat("#include \"b.h\"\n"
509 "#include \"c.h\"\n"
511 sort("#include \"llvm/a.h\"\n"
512 "#include \"c.h\"\n"
517 verifyFormat("#include \"b.h\"\n"
518 "#include \"c.h\"\n"
520 sort("#include \"llvm/a.h\"\n"
521 "#include \"c.h\"\n"
526 verifyFormat("#include <a>\n"
527 "\n"
528 "#include \"b.h\"\n"
529 "#include \"c.h\"\n"
531 sort("#include <a>\n"
532 "\n"
533 "#include \"llvm/a.h\"\n"
534 "#include \"c.h\"\n"
539 verifyFormat("#include \"a.h\"\n"
540 "#include \"b.h\"\n"
541 "#include \"c.h\"\n"
543 sort("#include \"b.h\"\n"
544 "#include \"a.h\"\n"
545 "#include \"c.h\"\n"
552 verifyFormat("#include \"b.h\"\n"
553 "#include \"c.h\"\n"
555 sort("#include \"llvm/a.h\"\n"
556 "#include \"c.h\"\n"
559 verifyFormat("#include \"b.h\"\n"
560 "#include \"c.h\"\n"
562 sort("#include \"llvm/a.h\"\n"
563 "#include \"c.h\"\n"
568 verifyFormat("#include \"llvm/a.h\"\n"
569 "#include \"b.h\"\n"
571 sort("#include \"llvm/a.h\"\n"
572 "#include \"c.h\"\n"
575 verifyFormat("#include \"llvm/a.h\"\n"
576 "#include \"b.h\"\n"
578 sort("#include \"llvm/a.h\"\n"
579 "#include \"c.h\"\n"
585 verifyFormat("#include \"llvm/a.h\"\n"
586 "#include \"b.h\"\n"
588 sort("#include \"llvm/a.h\"\n"
589 "#include \"c.h\"\n"
592 verifyFormat("#include \"llvm/a.h\"\n"
593 "#include \"b.h\"\n"
595 sort("#include \"llvm/a.h\"\n"
596 "#include \"c.h\"\n"
605 verifyFormat("#include \"c.h\"\n"
606 "#include \"a.h\"\n"
608 sort("#include \"b.h\"\n"
609 "\n"
610 "#include \"a.h\"\n"
619 verifyFormat("#include \"a.h\"\n"
620 "\n"
621 "#include \"b.h\"\n"
623 sort("#include \"b.h\"\n"
624 "\n"
625 "#include \"a.h\"\n"
635 verifyFormat("#include \"A/B.h\"\n"
636 "#include \"A/b.h\"\n"
637 "#include \"a/b.h\"\n"
638 "#include \"B/A.h\"\n"
640 sort("#include \"B/a.h\"\n"
641 "#include \"B/A.h\"\n"
642 "#include \"A/B.h\"\n"
643 "#include \"a/b.h\"\n"
651 StringRef UnsortedCode = "#include \"qt.h\"\n"
652 "#include <algorithm>\n"
653 "#include <qtwhatever.h>\n"
654 "#include <Qtwhatever.h>\n"
655 "#include <Algorithm>\n"
656 "#include \"vlib.h\"\n"
657 "#include \"Vlib.h\"\n"
660 verifyFormat("#include \"AST.h\"\n"
661 "#include \"qt.h\"\n"
662 "#include \"Vlib.h\"\n"
663 "#include \"vlib.h\"\n"
664 "\n"
665 "#include <Qtwhatever.h>\n"
666 "#include <qtwhatever.h>\n"
667 "\n"
668 "#include <Algorithm>\n"
679 verifyFormat("#include \"llvm/A.h\"\n"
680 "#include \"b.h\"\n"
681 "#include \"c.h\"\n"
682 "#include \"LLVM/z.h\"\n"
683 "#include \"llvm/X.h\"\n"
684 "#include \"GTest/GTest.h\"\n"
686 sort("#include \"c.h\"\n"
687 "#include \"b.h\"\n"
688 "#include \"GTest/GTest.h\"\n"
689 "#include \"llvm/A.h\"\n"
690 "#include \"gmock/gmock.h\"\n"
691 "#include \"llvm/X.h\"\n"
704 StringRef UnsortedCode = "#include <QWidget>\n"
705 "#include \"qt.h\"\n"
706 "#include <algorithm>\n"
707 "#include <windows.h>\n"
708 "#include <QLabel>\n"
709 "#include \"qa.h\"\n"
710 "#include <queue>\n"
711 "#include <qtwhatever.h>\n"
714 verifyFormat("#include \"qa.h\"\n"
715 "#include \"qt.h\"\n"
716 "\n"
717 "#include <qtwhatever.h>\n"
718 "#include <windows.h>\n"
719 "\n"
720 "#include <QLabel>\n"
721 "#include <QWidget>\n"
722 "#include <QtGlobal>\n"
723 "#include <queue>\n"
724 "\n"
730 verifyFormat("#include \"qa.h\"\n"
731 "#include \"qt.h\"\n"
732 "\n"
733 "#include <qtwhatever.h>\n"
734 "#include <windows.h>\n"
735 "\n"
736 "#include <QLabel>\n"
737 "#include <QWidget>\n"
738 "\n"
739 "#include <QtGlobal>\n"
740 "\n"
741 "#include <algorithm>\n"
749 verifyFormat("#include \"important_os_header.h\"\n"
750 "#include \"c_main.h\"\n"
752 sort("#include \"c_main.h\"\n"
753 "#include \"a_other.h\"\n"
758 verifyFormat("#include \"important_os_header.h\"\n"
759 "#include \"c_main.h\"\n"
761 sort("#include \"important_os_header.h\"\n"
762 "#include \"c_main.h\"\n"
772 verifyFormat("#include \"important_os_header.h\"\n"
773 "\n"
774 "#include \"c_main.h\"\n"
775 "\n"
777 sort("#include \"c_main.h\"\n"
778 "#include \"a_other.h\"\n"
783 verifyFormat("#include \"important_os_header.h\"\n"
784 "\n"
785 "#include \"c_main.h\"\n"
786 "\n"
788 sort("#include \"important_os_header.h\"\n"
789 "\n"
790 "#include \"c_main.h\"\n"
791 "\n"
797 StringRef Code = "#include <ccc>\n" // Start of line: 0
798 "#include <bbbbbb>\n" // Start of line: 15
799 "#include <a>\n"; // Start of line: 33
811 StringRef Code = "#include \"b\"\n" // Start of line: 0
812 "\n" // Start of line: 13
813 "#include \"aa\"\n" // Start of line: 14
815 StringRef Expected = "#include \"aa\"\n" // Start of line: 0
816 "#include \"b\"\n" // Start of line: 14
830 StringRef Code = "#include \"a\"\r\n" // Start of line: 0
831 "\r\n" // Start of line: 14
832 "#include \"b\"\r\n" // Start of line: 16
833 "\r\n" // Start of line: 30
834 "#include \"c\"\r\n" // Start of line: 32
835 "\r\n" // Start of line: 46
853 StringRef Code = "#include \"a\"\r\n" // Start of line: 0
854 "\r\n" // Start of line: 14
855 "#include \"b\"\r\n" // Start of line: 16
856 "\r\n" // Start of line: 30
857 "#include \"c\"\r\n" // Start of line: 32
858 "\r\n" // Start of line: 46
860 StringRef Expected = "#include \"a\"\r\n" // Start of line: 0
861 "#include \"b\"\r\n" // Start of line: 14
862 "#include \"c\"\r\n" // Start of line: 28
863 "\r\n" // Start of line: 42
888 StringRef Code = "#include \"a\"\r\n" // Start of line: 0
889 "#include \"b\"\r\n" // Start of line: 14
890 "#include \"c\"\r\n" // Start of line: 28
891 "\r\n" // Start of line: 42
893 StringRef Expected = "#include \"a\"\r\n" // Start of line: 0
894 "\r\n" // Start of line: 14
895 "#include \"b\"\r\n" // Start of line: 16
896 "\r\n" // Start of line: 30
897 "#include \"c\"\r\n" // Start of line: 32
898 "\r\n" // Start of line: 46
915 StringRef Code = "#include \"a\"\r\n" // Start of line: 0
916 "\r\n" // Start of line: 14
917 "#include \"c\"\r\n" // Start of line: 16
918 "\r\n" // Start of line: 30
919 "#include \"b\"\r\n" // Start of line: 32
920 "\r\n" // Start of line: 46
922 StringRef Expected = "#include \"a\"\r\n" // Start of line: 0
923 "\r\n" // Start of line: 14
924 "#include \"b\"\r\n" // Start of line: 16
925 "\r\n" // Start of line: 30
926 "#include \"c\"\r\n" // Start of line: 32
927 "\r\n" // Start of line: 46
941 verifyFormat("#include <a>\n"
942 "#include <b>\n"
944 sort("#include <a>\n"
945 "#include <b>\n"
946 "#include <b>\n"
947 "#include <b>\n"
948 "#include <b>\n"
952 verifyFormat("#include <a>\n"
953 "#include <b>\n"
955 sort("#include <a>\n"
956 "#include <b>\n"
957 "\n"
958 "#include <b>\n"
959 "\n"
960 "#include <b>\n"
964 verifyFormat("#include <a>\n"
965 "#include <b>\n"
967 sort("#include <a>\n"
968 "#include <b>\n"
969 "\n"
970 "#include <b>\n"
971 "\n"
972 "#include <b>\n"
977 verifyFormat("#include <a>\n"
978 "#include <b>\n"
980 sort("#include <b>\n"
981 "#include <a>\n"
982 "#include <b>\n"
983 "#include <b>\n"
984 "#include <c>\n"
987 verifyFormat("/* COPYRIGHT *\\\n"
988 "\\* (C) 2024 */\n"
989 "\n"
990 "#include <a>\n"
992 sort("/* COPYRIGHT *\\\n"
993 "\\* (C) 2024 */\n"
994 "\n"
995 "#include <b>\n"
996 "#include <a>\n"
1000 verifyFormat("#include <a>\n"
1001 "#include <b>\n"
1003 sort("#include <b>\n"
1004 "#include <a>\n"
1005 "\n"
1006 "#include <b>\n"
1007 "\n"
1008 "#include <c>\n"
1012 verifyFormat("#include <a>\n"
1013 "#include <b>\n"
1015 sort("#include <b>\n"
1016 "#include <a>\n"
1017 "\n"
1018 "#include <b>\n"
1019 "\n"
1020 "#include <c>\n"
1025 StringRef Code = "#include <b>\n" // Start of line: 0
1026 "#include <a>\n" // Start of line: 13
1027 "#include <b>\n" // Start of line: 26
1028 "#include <b>\n" // Start of line: 39
1029 "#include <c>\n" // Start of line: 52
1030 "#include <b>\n"; // Start of line: 65
1031 StringRef Expected = "#include <a>\n" // Start of line: 0
1032 "#include <b>\n" // Start of line: 13
1033 "#include <c>\n"; // Start of line: 26
1048 verifyFormat("#include <a>\n"
1049 "#include <b>\n"
1050 "\n"
1051 "#include <b>\n"
1053 sort("#include <a>\n"
1054 "#include <b>\n"
1055 "\n"
1056 "#include <c>\n"
1057 "#include <b>\n"
1062 StringRef Code = "#include <a>\n"
1063 "#include <b>\n"
1064 "#include <a>\n"
1065 "#include <a>\n"
1066 "\n"
1077 verifyFormat("<!--;\n"
1078 "#include <b>\n"
1079 "#include <a>\n"
1081 sort("<!--;\n"
1082 "#include <b>\n"
1083 "#include <a>\n"
1090 StringRef Code = "#include \"b.h\"\n"
1091 "\n"
1099 StringRef Code = "#include \"b.h\"\r\n"
1100 "\r\n"
1101 "#include <a.h>\r\n";
1106 StringRef Code = "#include <a>\n"
1107 "#include \"quote/input.h\"\n"
1108 "#include <angle-bracket/input.h>\n";
1111 verifyFormat("#include \"quote/input.h\"\n"
1112 "#include <a>\n"
1113 "#include <angle-bracket/input.h>\n",
1117 verifyFormat("#include \"quote/input.h\"\n"
1118 "#include <a>\n"
1119 "#include <angle-bracket/input.h>\n",
1123 verifyFormat("#include <angle-bracket/input.h>\n"
1124 "#include \"quote/input.h\"\n"
1125 "#include <a>\n",
1131 verifyFormat("#include \"input.h\"\n"
1132 "#include <a>\n"
1133 "#include <b>\n",
1134 sort("#include <a>\n"
1135 "#include \"input.h\"\n"
1136 "#include <b>\n",
1142 verifyFormat("#include <input.h>\n"
1143 "#include <a>\n"
1144 "#include <b>\n",
1145 sort("#include <a>\n"
1146 "#include <input.h>\n"
1147 "#include <b>\n",
1157 verifyFormat("#include \"lib-b/input.h\"\n"
1158 "\n"
1159 "#include <lib-a/h-1.h>\n"
1160 "#include <lib-a/h-3.h>\n"
1161 "#include <lib-a/input.h>\n"
1162 "\n"
1163 "#include <lib-b/h-1.h>\n"
1164 "#include <lib-b/h-3.h>\n"
1165 "\n"
1166 "#include <lib-c/h-1.h>\n"
1167 "#include <lib-c/h-2.h>\n"
1168 "#include <lib-c/h-3.h>\n",
1169 sort("#include <lib-c/h-1.h>\n"
1170 "#include <lib-c/h-2.h>\n"
1171 "#include <lib-c/h-3.h>\n"
1172 "#include <lib-b/h-1.h>\n"
1173 "#include \"lib-b/input.h\"\n"
1174 "#include <lib-b/h-3.h>\n"
1175 "#include <lib-a/h-1.h>\n"
1176 "#include <lib-a/input.h>\n"
1177 "#include <lib-a/h-3.h>\n",
1187 verifyFormat("#include <lib-a/input.h>\n"
1188 "\n"
1189 "#include <lib-a/h-1.h>\n"
1190 "#include <lib-a/h-3.h>\n"
1191 "\n"
1192 "#include \"lib-b/input.h\"\n"
1193 "#include <lib-b/h-1.h>\n"
1194 "#include <lib-b/h-3.h>\n"
1195 "\n"
1196 "#include <lib-c/h-1.h>\n"
1197 "#include <lib-c/h-2.h>\n"
1198 "#include <lib-c/h-3.h>\n",
1199 sort("#include <lib-c/h-1.h>\n"
1200 "#include <lib-c/h-2.h>\n"
1201 "#include <lib-c/h-3.h>\n"
1202 "#include <lib-b/h-1.h>\n"
1203 "#include \"lib-b/input.h\"\n"
1204 "#include <lib-b/h-3.h>\n"
1205 "#include <lib-a/h-1.h>\n"
1206 "#include <lib-a/input.h>\n"
1207 "#include <lib-a/h-3.h>\n",
1214 verifyFormat("#include <a.h>\n"
1215 "#include <b.h>\n"
1217 sort("#include <b.h>\n"
1218 "#include <a.h>\n"
1224 StringRef Code = "#include \"d.h\"\r\n"
1225 "#include \"b.h\"\r\n"
1226 "#pragma hdrstop\r\n"
1227 "\r\n"
1228 "#include \"c.h\"\r\n"
1229 "#include \"a.h\"\r\n"
1230 "#include \"e.h\"\r\n";
1232 StringRef Expected = "#include \"b.h\"\r\n"
1233 "#include \"d.h\"\r\n"
1234 "#pragma hdrstop\r\n"
1235 "\r\n"
1236 "#include \"e.h\"\r\n"
1237 "#include \"a.h\"\r\n"
1238 "#include \"c.h\"\r\n";
1242 Code = "#include \"d.h\"\n"
1243 "#include \"b.h\"\n"
1244 "#pragma hdrstop( \"c:\\projects\\include\\myinc.pch\" )\n"
1245 "\n"
1246 "#include \"c.h\"\n"
1247 "#include \"a.h\"\n"
1248 "#include \"e.h\"\n";
1250 Expected = "#include \"b.h\"\n"
1251 "#include \"d.h\"\n"
1252 "#pragma hdrstop(\"c:\\projects\\include\\myinc.pch\")\n"
1253 "\n"
1254 "#include \"e.h\"\n"
1255 "#include \"a.h\"\n"
1256 "#include \"c.h\"\n";
1263 StringRef Code = "\xEF\xBB\xBF#include \"d.h\"\r\n"
1264 "#include \"b.h\"\r\n"
1265 "\r\n"
1266 "#include \"c.h\"\r\n"
1267 "#include \"a.h\"\r\n"
1268 "#include \"e.h\"\r\n";
1270 StringRef Expected = "\xEF\xBB\xBF#include \"e.h\"\r\n"
1271 "#include \"a.h\"\r\n"
1272 "#include \"b.h\"\r\n"
1273 "#include \"c.h\"\r\n"
1274 "#include \"d.h\"\r\n";
1281 StringRef Code = "\xEF\xBB\xBF#include \"d.h\"\r\n"
1282 "#include \"b.h\"\r\n"
1283 "\r\n"
1284 "#include \"c.h\"\r\n"
1285 "#include \"a.h\"\r\n"
1286 "#include \"e.h\"\r\n";
1288 StringRef Expected = "\xEF\xBB\xBF#include \"b.h\"\r\n"
1289 "#include \"d.h\"\r\n"
1290 "\r\n"
1291 "#include \"a.h\"\r\n"
1292 "#include \"c.h\"\r\n"
1293 "#include \"e.h\"\r\n";
1300 StringRef Code = "#include \"c.h\"\r\n"
1301 "#include \"b\\\r\n"
1302 ".h\"\r\n"
1303 "#include \"a.h\"\r\n";
1305 StringRef Expected = "#include \"a.h\"\r\n"
1306 "#include \"b\\\r\n"
1307 ".h\"\r\n"
1308 "#include \"c.h\"\r\n";
1314 StringRef Sorted = "#include <a.h>\n"
1315 "#include <b.h>\n";
1316 StringRef Unsorted = "#include <b.h>\n"
1317 "#include <a.h>\n";
1325 verifyFormat("const char *t = R\"(\n"
1326 "#include <b.h>\n"
1327 "#include <a.h>\n"
1329 sort("const char *t = R\"(\n"
1330 "#include <b.h>\n"
1331 "#include <a.h>\n"
1334 verifyFormat("const char *t = R\"x(\n"
1335 "#include <b.h>\n"
1336 "#include <a.h>\n"
1338 sort("const char *t = R\"x(\n"
1339 "#include <b.h>\n"
1340 "#include <a.h>\n"
1343 verifyFormat("const char *t = R\"xyz(\n"
1344 "#include <b.h>\n"
1345 "#include <a.h>\n"
1347 sort("const char *t = R\"xyz(\n"
1348 "#include <b.h>\n"
1349 "#include <a.h>\n"
1353 verifyFormat("#include <a.h>\n"
1354 "#include <b.h>\n"
1355 "const char *t = R\"(\n"
1356 "#include <b.h>\n"
1357 "#include <a.h>\n"
1358 ")\";\n"
1359 "#include <c.h>\n"
1360 "#include <d.h>\n"
1361 "const char *t = R\"x(\n"
1362 "#include <f.h>\n"
1363 "#include <e.h>\n"
1364 ")x\";\n"
1365 "#include <g.h>\n"
1366 "#include <h.h>\n"
1367 "const char *t = R\"xyz(\n"
1368 "#include <j.h>\n"
1369 "#include <i.h>\n"
1370 ")xyz\";\n"
1371 "#include <k.h>\n"
1373 sort("#include <b.h>\n"
1374 "#include <a.h>\n"
1375 "const char *t = R\"(\n"
1376 "#include <b.h>\n"
1377 "#include <a.h>\n"
1378 ")\";\n"
1379 "#include <d.h>\n"
1380 "#include <c.h>\n"
1381 "const char *t = R\"x(\n"
1382 "#include <f.h>\n"
1383 "#include <e.h>\n"
1384 ")x\";\n"
1385 "#include <h.h>\n"
1386 "#include <g.h>\n"
1387 "const char *t = R\"xyz(\n"
1388 "#include <j.h>\n"
1389 "#include <i.h>\n"
1390 ")xyz\";\n"
1391 "#include <l.h>\n"
1395 verifyFormat("const char *t = R\"AMZ029amz(\n"
1396 "#include <b.h>\n"
1397 "#include <a.h>\n"
1399 sort("const char *t = R\"AMZ029amz(\n"
1400 "#include <b.h>\n"
1401 "#include <a.h>\n"
1405 verifyFormat("const char *t = R\"-AMZ029amz(\n"
1406 "#include <b.h>\n"
1407 "#include <a.h>\n"
1409 sort("const char *t = R\"-AMZ029amz(\n"
1410 "#include <b.h>\n"
1411 "#include <a.h>\n"
1415 verifyFormat("const char *t = R\"AMZ029amz-(\n"
1416 "#include <b.h>\n"
1417 "#include <a.h>\n"
1419 sort("const char *t = R\"AMZ029amz-(\n"
1420 "#include <b.h>\n"
1421 "#include <a.h>\n"
1425 verifyFormat("const char *t = R\"AM|029amz-(\n"
1426 "#include <b.h>\n"
1427 "#include <a.h>\n"
1429 sort("const char *t = R\"AM|029amz-(\n"
1430 "#include <b.h>\n"
1431 "#include <a.h>\n"
1435 verifyFormat("const char *t = R\"AM[029amz-(\n"
1436 "#include <b.h>\n"
1437 "#include <a.h>\n"
1439 sort("const char *t = R\"AM[029amz-(\n"
1440 "#include <b.h>\n"
1441 "#include <a.h>\n"
1445 verifyFormat("const char *t = R\"AM]029amz-(\n"
1446 "#include <b.h>\n"
1447 "#include <a.h>\n"
1449 sort("const char *t = R\"AM]029amz-(\n"
1450 "#include <b.h>\n"
1451 "#include <a.h>\n"
1457 verifyFormat("const char *t = R\"" X "(\n"
1458 "#include <b.h>\n"
1459 "#include <a.h>\n"
1461 sort("const char *t = R\"" X "(\n"
1462 "#include <b.h>\n"
1463 "#include <a.h>\n"
1471 StringRef Code{"/* #include \"foo.h\"\n"
1472 "#include \"bar.h\" */\n"