Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 903653c03d57d8324104d7dc83767f8363f9c38e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
/*******************************************************************************
 * Copyright (c) 2007, 2017 Wind River Systems, Inc. and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     Anton Leherbauer (Wind River Systems) - initial API and implementation
 *     Andrew Ferguson (Symbian)
 *     Sergey Prigogin (Google)
 *******************************************************************************/
package org.eclipse.cdt.ui.tests.text;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage;
import org.eclipse.cdt.core.formatter.CodeFormatter;
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterOptions;
import org.eclipse.cdt.internal.corext.util.CodeFormatterUtil;
import org.eclipse.cdt.internal.formatter.align.Alignment;
import org.eclipse.cdt.ui.tests.BaseUITestCase;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.TextUtilities;
import org.eclipse.text.edits.TextEdit;

import junit.framework.TestSuite;

/**
 * Tests for the CodeFormatter.
 *
 * @since 4.0
 */
public class CodeFormatterTest extends BaseUITestCase {
	private Map<String, Object> fOptions;
	private Map<String, String> fDefaultOptions;

	public static TestSuite suite() {
		return suite(CodeFormatterTest.class, "_");
	}

	@Override
	protected void setUp() throws Exception {
		super.setUp();
		fDefaultOptions = DefaultCodeFormatterOptions.getDefaultSettings().getMap();
		fOptions = new HashMap<>(fDefaultOptions);
	}

	@Override
	protected void tearDown() throws Exception {
		super.tearDown();
	}

	protected void assertFormatterResult() throws Exception {
		CharSequence[] contents = getContentsForTest(2);
		String before = contents[0].toString();
		String expected = contents[1].toString();
		assertFormatterResult(before, expected);
	}

	private void assertFormatterResult(String original, String expected) throws BadLocationException {
		IDocument document = new Document(original);
		TextEdit edit = CodeFormatterUtil.format(CodeFormatter.K_TRANSLATION_UNIT, original, 0,
				TextUtilities.getDefaultLineDelimiter(document), fOptions);
		assertNotNull(edit);
		edit.apply(document);
		assertEquals(expected, document.get());
	}

	//void foo(int arg);
	//void foo(int arg){}

	//void foo (int arg);
	//void foo (int arg) {
	//}
	public void testInsertSpaceBeforeOpeningParen_Bug190184() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_DECLARATION,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//void FailSwitchFormatting(void)
	//{
	//        switch (confusefomatter)
	//        {
	//
	//        case START_CONFUSION:
	//                SomeFunctionCallWithTypecast(( castConfusion_t)myvar1,
	//                (castNoAdditionalConfusion_t) myvar2);
	//                break;
	//
	//                case REVEAL_CONFUSION:
	//                if (myBlockIndentIsOk)
	//                {
	//                        myBlockstuff();
	//                }
	//                break;
	//
	//                case CONTINUE_CONFUSION:
	//                {
	//                        //the indentation problem continues...
	//                }
	//                default://....still not right
	//        }
	//}

	//void FailSwitchFormatting(void) {
	//	switch (confusefomatter) {
	//
	//	case START_CONFUSION:
	//		SomeFunctionCallWithTypecast((castConfusion_t) myvar1,
	//				(castNoAdditionalConfusion_t) myvar2);
	//		break;
	//
	//	case REVEAL_CONFUSION:
	//		if (myBlockIndentIsOk) {
	//			myBlockstuff();
	//		}
	//		break;
	//
	//	case CONTINUE_CONFUSION: {
	//		//the indentation problem continues...
	//	}
	//	default: //....still not right
	//	}
	//}
	public void testIndentConfusionByCastExpression_Bug191021() throws Exception {
		assertFormatterResult();
	}

	//int
	//var;
	//int*
	//pvar;

	//int var;
	//int *pvar;
	public void testSpaceBetweenTypeAndIdentifier_Bug194603() throws Exception {
		assertFormatterResult();
	}

	//int a = sizeof(     int)    ;

	//int a = sizeof(int);
	public void testSizeofExpression_Bug195246() throws Exception {
		assertFormatterResult();
	}

	//int x;
	//int a = sizeof     x    ;

	//int x;
	//int a = sizeof x;
	public void testSizeofExpression_Bug201330() throws Exception {
		assertFormatterResult();
	}

	//void foo(){
	//for(;;){
	//int a=0;
	//switch(a){
	//case 0:
	//++a;
	//break;
	//case 1:
	//--a;
	//break;
	//}
	//}
	//}
	//int main(void){
	//foo();
	//return 1;
	//}

	//void foo() {
	//	for (;;) {
	//		int a = 0;
	//		switch (a) {
	//		case 0:
	//			++a;
	//			break;
	//		case 1:
	//			--a;
	//			break;
	//		}
	//	}
	//}
	//int main(void) {
	//	foo();
	//	return 1;
	//}
	public void testForWithEmptyExpression_Bug195942() throws Exception {
		assertFormatterResult();
	}

	//class ClassWithALongName {
	//public:
	//class Iterator {
	//bool isDone();
	//void next();
	//};
	//
	//Iterator getIterator();
	//};
	//
	//void test() {
	//ClassWithALongName* variable_with_a_long_name;
	//for (ClassWithALongName::Iterator iter_for_class_with_a_long_name = variable_with_a_long_name->getIterator(); !iter_for_class_with_a_long_name.isDone(); iter_for_class_with_a_long_name.next()) {
	//}
	//}

	//class ClassWithALongName {
	//public:
	//    class Iterator {
	//        bool isDone();
	//        void next();
	//    };
	//
	//    Iterator getIterator();
	//};
	//
	//void test() {
	//    ClassWithALongName *variable_with_a_long_name;
	//    for (ClassWithALongName::Iterator iter_for_class_with_a_long_name =
	//            variable_with_a_long_name->getIterator();
	//            !iter_for_class_with_a_long_name.isDone();
	//            iter_for_class_with_a_long_name.next()) {
	//    }
	//}
	public void testForWithEmptyExpression_Bug280989() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//void test() {
	//if (1000000 + 2000000 < 3000000 + 4000000 && 5000000 + 6000000 <= 7000000) {
	// // comment
	//}
	//if (1000000 + 2000000 < 3000000 + 4000000 && 5000000 + 6000000 <= 70000000) {
	// // comment
	//}
	//}

	//void test() {
	//    if (1000000 + 2000000 < 3000000 + 4000000 && 5000000 + 6000000 <= 7000000) {
	//        // comment
	//    }
	//    if (1000000 + 2000000 < 3000000 + 4000000
	//            && 5000000 + 6000000 <= 70000000) {
	//        // comment
	//    }
	//}
	public void testIfStatement() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define MY private:
	//
	//class ClassA
	//{
	//MY ClassA() {}
	//};

	//#define MY private:
	//
	//class ClassA {
	//MY
	//	ClassA() {
	//	}
	//};
	public void testAccessSpecifierAsMacro_Bug197494() throws Exception {
		assertFormatterResult();
	}

	//int verylooooooooooooooooooooooooooooooooooongname = 0000000000000000000000000000000;

	//int verylooooooooooooooooooooooooooooooooooongname =
	//		0000000000000000000000000000000;
	public void testLineWrappingOfInitializerExpression_Bug200961() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT,
				Integer.toString(Alignment.M_COMPACT_SPLIT));
		assertFormatterResult();
	}

	//void functionWithLooooooooooooooooooooooooooooooooooooooooooooooooongName() throw(float);

	//void functionWithLooooooooooooooooooooooooooooooooooooooooooooooooongName()
	//		throw (float);
	public void testLineWrappingOfThrowSpecification_Bug200959() throws Exception {
		assertFormatterResult();
	}

	//class A {
	//public:
	//A();
	//};

	//class A
	//    {
	//public:
	//    A();
	//    };
	public void testWhiteSmithsAccessSpecifierIndentation1_Bug204575() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER,
				DefaultCodeFormatterConstants.FALSE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER,
				DefaultCodeFormatterConstants.TRUE);
		assertFormatterResult();
	}

	//class A {
	//public:
	//A();
	//};

	//class A
	//    {
	//    public:
	//    A();
	//    };
	public void testWhiteSmithsAccessSpecifierIndentation2_Bug204575() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER,
				DefaultCodeFormatterConstants.TRUE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER,
				DefaultCodeFormatterConstants.FALSE);
		assertFormatterResult();
	}

	//class A {
	//public:
	//A();
	//};

	//class A
	//    {
	//    public:
	//	A();
	//    };
	public void testWhiteSmithsAccessSpecifierIndentation3_Bug204575() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_ACCESS_SPECIFIER_COMPARE_TO_TYPE_HEADER,
				DefaultCodeFormatterConstants.TRUE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_ACCESS_SPECIFIER,
				DefaultCodeFormatterConstants.TRUE);
		assertFormatterResult();
	}

	//class A final {
	//public:
	//A();
	//};

	//class A final {
	//public:
	//	A();
	//};
	public void testKeywordFinal_Bug460551() throws Exception {
		assertFormatterResult();
	}

	//class A
	//final : public B {
	//public:
	//A();
	//};

	//class A final : public B {
	//public:
	//	A();
	//};
	public void testKeywordFinalDerivedClass_Bug460551() throws Exception {
		assertFormatterResult();
	}

	//template<typename T> class B {};
	//template<typename T1,typename T2=B<T1> > class A {};

	//template<typename T> class B {
	//};
	//template<typename T1, typename T2 = B<T1> > class A {
	//};
	public void testNestedTemplateParameters_Bug206801() throws Exception {
		assertFormatterResult();
	}

	//int main
	//(
	//    int           argc,
	//    char const int*  argv[]
	//)
	//try
	//{
	//    for ( int i = 1 ; i < argc ; ++i )
	//    {
	//    }
	//    return 0;
	//}
	//catch ( float e )
	//{
	//    return 1;
	//}
	//catch ( ... )
	//{
	//	return 2;
	//}

	//int main(int argc, char const int *argv[])
	//try {
	//	for (int i = 1; i < argc; ++i) {
	//	}
	//	return 0;
	//}
	//catch (float e) {
	//	return 1;
	//}
	//catch (...) {
	//	return 2;
	//}
	public void testFunctionTryCatchBlock() throws Exception {
		assertFormatterResult();
	}

	//int main(int argc, char const int * argv[]) { try { for (int i = 1; i < argc; ++i) { } return 0; } catch (float e) { return 1; } catch (...) { return 2; } }

	//int main(int argc, char const int *argv[]) {
	//	try {
	//		for (int i = 1; i < argc; ++i) {
	//		}
	//		return 0;
	//	} catch (float e) {
	//		return 1;
	//	} catch (...) {
	//		return 2;
	//	}
	//}
	public void testTryCatchBlock() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//#define I 0
	//    int i = I;
	//}

	//void f() {
	//#define I 0
	//	int i = I;
	//}
	public void testMacroAsInitializer_Bug214354() throws Exception {
		assertFormatterResult();
	}

	//#define break_start(); { int foo;
	//#define break_end(); foo = 0; }
	//
	//void break_indenter(int a, int b) {
	//    break_start(); // This semicolon moves to its own line.
	//    if(a > b) {
	//        indentation_remains();
	//    }
	//
	//    if(b>a)
	//        indentation_vanishes();
	//
	//    break_end();
	//
	//    if(b == a)
	//      indentation_remains();
	//}

	//#define break_start(); { int foo;
	//#define break_end(); foo = 0; }
	//
	//void break_indenter(int a, int b) {
	//	break_start(); // This semicolon moves to its own line.
	//	if (a > b) {
	//		indentation_remains();
	//	}
	//
	//	if (b > a)
	//		indentation_vanishes();
	//
	//	break_end();
	//
	//	if (b == a)
	//		indentation_remains();
	//}
	public void testBracesInMacros_Bug217435() throws Exception {
		assertFormatterResult();
	}

	//struct SimpleStruct {
	//int num;
	//char name[];
	//float floatNum;
	//};
	//
	//#define SIZEOF(A, B) sizeof(A.B)
	//
	//const SimpleStruct array[] = { { SIZEOF(simpleStruct, num),
	//#if FOO
	//"foo"
	//#else
	//"bar"
	//#endif
	//, 0.5 }, { SIZEOF(simpleStruct, floatNum), "name", 1.1 } };

	//struct SimpleStruct {
	//	int num;
	//	char name[];
	//	float floatNum;
	//};
	//
	//#define SIZEOF(A, B) sizeof(A.B)
	//
	//const SimpleStruct array[] = { { SIZEOF(simpleStruct, num),
	//#if FOO
	//"foo"
	//#else
	//		"bar"
	//#endif
	//		, 0.5 }, { SIZEOF(simpleStruct, floatNum), "name", 1.1 } };
	public void testArrayInitializer() throws Exception {
		assertFormatterResult();
	}

	//int a=1+2;
	//int b= - a;
	//int c =b ++/-- b;

	//int a = 1 + 2;
	//int b = -a;
	//int c = b++ / --b;
	public void testWhitespaceSurroundingOperators() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//int *px= :: new int(  0 );
	//int* py [] =  new   int [5 ] (0, 1,2,3, 4);
	//int  *pz[ ] =new ( px)int(0);
	//delete  []  py;
	//:: delete px;}

	//void f() {
	//	int *px = ::new int(0);
	//	int *py[] = new int[5](0, 1, 2, 3, 4);
	//	int *pz[] = new (px) int(0);
	//	delete[] py;
	//	::delete px;
	//}
	public void testNewAndDeleteExpressions() throws Exception {
		assertFormatterResult();
	}

	//namespace   X=
	//   Y ::
	// 	    Z ;

	//namespace X = Y::Z;
	public void testNamespaceAlias() throws Exception {
		assertFormatterResult();
	}

	//using
	//   typename:: T
	//;
	//using X::
	// T ;

	//using typename ::T;
	//using X::T;
	public void testUsingDeclaration() throws Exception {
		assertFormatterResult();
	}

	//using
	//  namespace
	//    X ;

	//using namespace X;
	public void testUsingDirective() throws Exception {
		assertFormatterResult();
	}

	//static void *f(){}
	//static void * g();
	//static void* h();
	//int* (*a) [2];

	//static void* f() {
	//}
	//static void* g();
	//static void* h();
	//int *(*a)[2];
	public void testSpaceBetweenDeclSpecAndDeclarator() throws Exception {
		assertFormatterResult();
	}

	//typedef signed int TInt;
	//extern void Bar();  // should not have space between parens
	//
	//void Foo()    // should not have space between parens
	//{
	//  TInt a(3);  // should become TInt a( 3 );
	//  Bar();   // should not have space between parens
	//}

	//typedef signed int TInt;
	//extern void Bar();  // should not have space between parens
	//
	//void Foo()    // should not have space between parens
	//	{
	//	TInt a( 3 );  // should become TInt a( 3 );
	//	Bar();   // should not have space between parens
	//	}
	public void testSpaceBetweenParen_Bug217918() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION,
				DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_STATEMENTS_COMPARE_TO_BODY,
				DefaultCodeFormatterConstants.FALSE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_DECLARATION,
				CCorePlugin.INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_DECLARATION,
				CCorePlugin.INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_DECLARATION,
				CCorePlugin.DO_NOT_INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION,
				CCorePlugin.INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_INVOCATION,
				CCorePlugin.INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION,
				CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//class Example: public FooClass, public virtual BarClass {};

	//class Example:
	//		public FooClass,
	//		public virtual BarClass {
	//};
	public void testAlignmentOfClassDefinitionBaseClause1_Bug192656() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BASE_CLAUSE_IN_TYPE_DECLARATION,
				Integer.toString(Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_FORCE));
		assertFormatterResult();
	}

	//class Example: public FooClass, public virtual BarClass {};

	//class Example:	public FooClass,
	//				public virtual BarClass {
	//};
	public void testAlignmentOfClassDefinitionBaseClause2_Bug192656() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BASE_CLAUSE_IN_TYPE_DECLARATION,
				Integer.toString(Alignment.M_NEXT_PER_LINE_SPLIT | Alignment.M_FORCE | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//class Example { void foo() throw(int); };
	//void Example::foo()throw(int){}

	//class Example {
	//	void foo()
	//		throw (int);
	//};
	//void Example::foo()
	//	throw (int) {
	//}
	public void testAlignmentOfExceptionSpecificationInMethodDeclaration_Bug191980() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_THROWS_CLAUSE_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_FORCE | Alignment.M_INDENT_BY_ONE));
		assertFormatterResult();
	}

	//class ClassWithALongName {
	//public:
	//ClassWithALongName* methodWithAQuiteLongName();
	//};
	//
	//void test() {
	//ClassWithALongName* variable_with_a_long_name = variable_with_a_long_name->methodWithAQuiteLongName();
	//variable_with_a_long_name = variable_with_a_long_name->methodWithAQuiteLongName();
	//}

	//class ClassWithALongName {
	//public:
	//    ClassWithALongName* methodWithAQuiteLongName();
	//};
	//
	//void test() {
	//    ClassWithALongName *variable_with_a_long_name =
	//            variable_with_a_long_name->methodWithAQuiteLongName();
	//    variable_with_a_long_name =
	//            variable_with_a_long_name->methodWithAQuiteLongName();
	//}
	public void testAssignment() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT,
				Integer.toString(Alignment.M_COMPACT_SPLIT));
		assertFormatterResult();
	}

	//class ClassWithALongName {
	//public:
	//ClassWithALongName* methodWithALongName();
	//ClassWithALongName* anotherMethodWithALongName();
	//};
	//
	//void test() {
	//ClassWithALongName* variable_with_a_long_name;
	//ClassWithALongName* another_variable = variable_with_a_long_name->methodWithALongName()->anotherMethodWithALongName();
	//}

	//class ClassWithALongName {
	//public:
	//    ClassWithALongName* methodWithALongName();
	//    ClassWithALongName* anotherMethodWithALongName();
	//};
	//
	//void test() {
	//    ClassWithALongName *variable_with_a_long_name;
	//    ClassWithALongName *another_variable = variable_with_a_long_name
	//            ->methodWithALongName()->anotherMethodWithALongName();
	//}
	public void testMemberAccess() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT,
				Integer.toString(Alignment.M_COMPACT_SPLIT));
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MEMBER_ACCESS,
				Integer.toString(Alignment.M_COMPACT_SPLIT));
		assertFormatterResult();
	}

	//int foo(){try{}catch(...){}}
	//float* bar();
	//template<typename _CharT, typename _Traits>class basic_ios : public ios_base{public:
	//  // Types:
	//};

	//int
	//foo ()
	//{
	//  try
	//    {
	//    }
	//  catch (...)
	//    {
	//    }
	//}
	//float*
	//bar ();
	//template<typename _CharT, typename _Traits>
	//  class basic_ios : public ios_base
	//  {
	//  public:
	//    // Types:
	//  };
	public void testGNUCodingStyleConformance_Bug192764() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getGNUSettings().getMap());
		assertFormatterResult();
	}

	//NOT_DEFINED void foo(){
	//	}
	//
	//enum T1
	//    {
	//    E1 = 1
	//    };

	//NOT_DEFINED void foo() {
	//}
	//
	//enum T1 {
	//	E1 = 1
	//};
	public void testPreserveWhitespace_Bug225326() throws Exception {
		assertFormatterResult();
	}

	//NOT_DEFINED void foo()
	//	{
	//	}
	//
	//enum T1
	//    {
	//    E1 = 1
	//    };

	//NOT_DEFINED void foo()
	//    {
	//    }
	//
	//enum T1
	//    {
	//    E1 = 1
	//    };
	public void testPreserveWhitespace2_Bug225326() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
		assertFormatterResult();
	}

	//enum Tthe3rdtestIds
	//{
	//ECommand1 = 0x6001,
	//ECommand2,
	//EHelp,
	//EAbout
	//};
	//
	//CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();

	//enum Tthe3rdtestIds
	//    {
	//    ECommand1 = 0x6001,
	//    ECommand2,
	//    EHelp,
	//    EAbout
	//    };
	//
	//CActiveScheduler *scheduler = new (ELeave) CActiveScheduler();
	public void testFormatterRegressions_Bug225858() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
		assertFormatterResult();
	}

	//typedef int int_;
	//int_ const f(int_ const i);

	//typedef int int_;
	//int_ const f(int_ const i);
	public void testPreserveWhitespaceInParameterDecl_Bug228997() throws Exception {
		assertFormatterResult();
	}

	//#include "header.h"  // comment
	//
	//class C;

	//#include "header.h"  // comment
	//
	//class C;
	public void testPreserveBlankLineAfterInclude() throws Exception {
		assertFormatterResult();
	}

	//void f() { throw 42; }

	//void f() {
	//	throw 42;
	//}
	public void testSpaceAfterThrowKeyword_Bug229774() throws Exception {
		assertFormatterResult();
	}

	//struct { int l; } s;
	//void f() {
	//  int x = (s.l -5);
	//  // Comment
	//  for(;;);
	//}

	//struct {
	//	int l;
	//} s;
	//void f() {
	//	int x = (s.l - 5);
	//	// Comment
	//	for (;;)
	//		;
	//}
	public void testIndentAfterDotL_Bug232739() throws Exception {
		assertFormatterResult();
	}

	//struct { int e; } s;
	//void f() {
	//  int x = (s.e -5);
	//  // Comment
	//  for(;;);
	//}

	//struct {
	//	int e;
	//} s;
	//void f() {
	//	int x = (s.e - 5);
	//	// Comment
	//	for (;;)
	//		;
	//}
	public void testIndentAfterDotE_Bug232739() throws Exception {
		assertFormatterResult();
	}

	//struct { int f; } s;
	//void f() {
	//  int x = (s.f -5);
	//  // Comment
	//  for(;;);
	//}

	//struct {
	//	int f;
	//} s;
	//void f() {
	//	int x = (s.f - 5);
	//	// Comment
	//	for (;;)
	//		;
	//}
	public void testIndentAfterDotF_Bug232739() throws Exception {
		assertFormatterResult();
	}

	//int a = 0, b = 1, c = 2, d = 3;

	//int a = 0,b = 1,c = 2,d = 3;
	public void testSpaceAfterCommaInDeclaratorList_Bug234915() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_DECLARATOR_LIST,
				CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//int a = 0,b = 1,c = 2,d = 3;

	//int a = 0, b = 1, c = 2, d = 3;
	public void testSpaceAfterCommaInDeclaratorList2_Bug234915() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_DECLARATOR_LIST,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//void foo() {
	//    int x;        // comment
	//    int y;        // will be shifted to the left to avoid exceeding max line length
	//    		        // continuation of the previous comment
	////  int z;  <- comments starting from the beginning of line are not indented
	//}

	//void foo() {
	//    int x;        // comment
	//    int y;     // will be shifted to the left to avoid exceeding max line length
	//               // continuation of the previous comment
	////  int z;  <- comments starting from the beginning of line are not indented
	//}
	public void testLineCommentPreserveWhiteSpaceBefore() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_PRESERVE_WHITE_SPACE_BETWEEN_CODE_AND_LINE_COMMENT,
				DefaultCodeFormatterConstants.TRUE);
		assertFormatterResult();
	}

	//namespace ns1 {
	//namespace ns2 {
	//void foo() {
	//    int x;// comment
	//    int y;// comment
	//    		// continuation of the previous comment
	////  int z;  <- comments starting from the beginning of line are not indented
	//}
	//}// namespace ns2
	//}// namespace ns1

	//namespace ns1 {
	//namespace ns2 {
	//void foo() {
	//    int x;  // comment
	//    int y;  // comment
	//            // continuation of the previous comment
	////  int z;  <- comments starting from the beginning of line are not indented
	//}
	//}  // namespace ns2
	//}  // namespace ns1
	public void testLineCommentMinDistanceFromCode() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_MIN_DISTANCE_BETWEEN_CODE_AND_LINE_COMMENT, "2");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_PRESERVE_WHITE_SPACE_BETWEEN_CODE_AND_LINE_COMMENT,
				DefaultCodeFormatterConstants.FALSE);
		assertFormatterResult();
	}

	//void f() {
	// 	class Object;
	//	int aVeryLongParameterThatShouldBeInOneLine1;
	//	int aVeryLongParameterThatShouldBeInOneLine2;
	//
	//	myNewFunctionCall1(Object(aVeryLongParameterThatShouldBeInOneLine1, aVeryLongParameterThatShouldBeInOneLine2));
	//
	//	myNewFunctionCall2(new Object(aVeryLongParameterThatShouldBeInOneLine1, aVeryLongParameterThatShouldBeInOneLine2));
	//}

	//void f() {
	//	class Object;
	//	int aVeryLongParameterThatShouldBeInOneLine1;
	//	int aVeryLongParameterThatShouldBeInOneLine2;
	//
	//	myNewFunctionCall1(
	//			Object(aVeryLongParameterThatShouldBeInOneLine1,
	//					aVeryLongParameterThatShouldBeInOneLine2));
	//
	//	myNewFunctionCall2(
	//			new Object(aVeryLongParameterThatShouldBeInOneLine1,
	//					aVeryLongParameterThatShouldBeInOneLine2));
	//}
	public void testLineWrappingOfConstructorCall_Bug237097() throws Exception {
		assertFormatterResult();
	}

	//bool test(bool x)
	//{
	//   return x or x and not (not x);
	//}

	//bool test(bool x) {
	//	return x or x and not (not x);
	//}
	public void testSpaceBeforeAndAfterAlternativeLogicalOperator_Bug239461() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_BINARY_OPERATOR,
				CCorePlugin.DO_NOT_INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_BINARY_OPERATOR,
				CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//void A::a(C e) { if (D::iterator it = m.find (e)) m.erase(it);}
	//T* A::b(T* t) { S::iterator it = m.find(t); if (!it) return NULL; else return *it; }
	//M* A::c(M* tm) { N::iterator it = myN.find(tm); if (!it) return NULL; else return *it; }

	//void A::a(C e) {
	//	if (D::iterator it = m.find(e))
	//		m.erase(it);
	//}
	//T* A::b(T *t) {
	//	S::iterator it = m.find(t);
	//	if (!it)
	//		return NULL;
	//	else
	//		return *it;
	//}
	//M* A::c(M *tm) {
	//	N::iterator it = myN.find(tm);
	//	if (!it)
	//		return NULL;
	//	else
	//		return *it;
	//}
	public void testHandleParsingProblemsInIfCondition_Bug240564() throws Exception {
		assertFormatterResult();
	}

	//TestType1<TESTNS::TestType2<3> > test_variable;

	//TestType1<TESTNS::TestType2<3> > test_variable;
	public void testNestedTemplatedArgument_Bug241058() throws Exception {
		assertFormatterResult();
	}

	//#define TP_SMALLINT int32_t
	//void foo(const TP_SMALLINT &intVal) { }
	//void bar(const TP_SMALLINT intVal) { }

	//#define TP_SMALLINT int32_t
	//void foo(const TP_SMALLINT &intVal) {
	//}
	//void bar(const TP_SMALLINT intVal) {
	//}
	public void testPreserveSpaceInParameterDecl_Bug241967() throws Exception {
		assertFormatterResult();
	}

	//void f1(const char* long_parameter_name, int very_looooooooooong_parameter_name, int another_parameter_name );
	//void f2(const char* long_parameter_name,int very_loooooooooooong_parameter_name, int another_parameter_name )  ;
	//void f3(const char* long_parameter_name,int very_loooooooooooong_parameter_name,int very_loong_parameter_name)  ;
	//void f4(const char* long_parameter_name, int very_loooooooooooong_parameter_name,int very_looong_parameter_name)  ;

	//void f1(const char *long_parameter_name, int very_looooooooooong_parameter_name,
	//        int another_parameter_name);
	//void f2(const char *long_parameter_name,
	//        int very_loooooooooooong_parameter_name, int another_parameter_name);
	//void f3(const char *long_parameter_name,
	//        int very_loooooooooooong_parameter_name, int very_loong_parameter_name);
	//void f4(const char *long_parameter_name,
	//        int very_loooooooooooong_parameter_name,
	//        int very_looong_parameter_name);
	public void testFunctionDeclaration() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//const char* function_name1(const char* parameter_name, const char* another_parameter_name,
	//int very_loooooooooooooooooooooooong_parameter_name);
	//const char* function_name2(const char* parameter_name, const char* another_parameter_name,
	//int very_looooooooooooooooooooooooong_parameter_name);

	//const char* function_name1(const char *parameter_name,
	//                           const char *another_parameter_name,
	//                           int very_loooooooooooooooooooooooong_parameter_name);
	//const char* function_name2(
	//        const char *parameter_name, const char *another_parameter_name,
	//        int very_looooooooooooooooooooooooong_parameter_name);
	public void testFunctionDeclarationFallbackFormat() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//#define ABSTRACT = 0
	//
	//class A {
	//    virtual bool function_with_a_loooooong_name(const char* parameter) ABSTRACT;
	//    virtual bool function_with_a_looooooong_name(const char* parameter) ABSTRACT;
	//};

	//#define ABSTRACT = 0
	//
	//class A {
	//    virtual bool function_with_a_loooooong_name(const char *parameter) ABSTRACT;
	//    virtual bool function_with_a_looooooong_name(const char *parameter)
	//            ABSTRACT;
	//};
	public void testFunctionDeclarationTrailingMacro_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//#define MACRO_WITH_ONE_PARAMETER(p)
	//
	//class A {
	//void method1(int arguuuuuuuuuuuuuuuuuuuuument) MACRO_WITH_ONE_PARAMETER(p) {}
	//void method2(int arguuuuuuuuuuuuuuuuuuuuuument) MACRO_WITH_ONE_PARAMETER(p) {}
	//};

	//#define MACRO_WITH_ONE_PARAMETER(p)
	//
	//class A {
	//    void method1(int arguuuuuuuuuuuuuuuuuuuuument) MACRO_WITH_ONE_PARAMETER(p) {
	//    }
	//    void method2(int arguuuuuuuuuuuuuuuuuuuuuument)
	//            MACRO_WITH_ONE_PARAMETER(p) {
	//    }
	//};
	public void testFunctionDeclarationTrailingMacro_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//void f1(const char* long_parameter_name,int very_looooooooong_parameter_name){}
	//void f2(const char* long_parameter_name,int very_loooooooooong_parameter_name){}

	//void f1(const char *long_parameter_name, int very_looooooooong_parameter_name) {
	//}
	//void f2(const char *long_parameter_name,
	//        int very_loooooooooong_parameter_name) {
	//}
	public void testFunctionDefinition() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//struct moveonly {
	//moveonly()=default;
	//moveonly(const moveonly&)=delete;
	//moveonly(moveonly&&)=default;
	//moveonly& operator=(const moveonly&)=delete;
	//moveonly& operator=(moveonly&&)=default;
	//~moveonly()=default;
	//};

	//struct moveonly {
	//    moveonly() = default;
	//    moveonly(const moveonly&) = delete;
	//    moveonly(moveonly&&) = default;
	//    moveonly& operator=(const moveonly&) = delete;
	//    moveonly& operator=(moveonly&&) = default;
	//    ~moveonly() = default;
	//};
	public void testFunctionDefinitionWithoutBody() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//int f1(int a, int b, int c, int d, int e, int f, int g);
	//int f2(int a, int b, int c, int d, int e, int f, int g);
	//
	//void test() {
	//f1(100000000,200000000,300000000,400000000,500000000,600000000,70000);
	//f1(100000000,200000000,300000000,400000000,500000000,600000000,700000);
	//f1(100000,200000,300000,400000,500000,600000,f2(1,2,3,4,5,6,7));
	//f1(100000,200000,300000,400000,500000,600000,f2(1,2,3,4,5,6,70));
	//f1(100000,200000,300000,400000,500000,f2(10,20,30,40,50,60,7000),700000);
	//f1(100000,200000,300000,400000,500000,f2(10,20,30,40,50,60,70000),700000);
	//}

	//int f1(int a, int b, int c, int d, int e, int f, int g);
	//int f2(int a, int b, int c, int d, int e, int f, int g);
	//
	//void test() {
	//    f1(100000000, 200000000, 300000000, 400000000, 500000000, 600000000, 70000);
	//    f1(100000000, 200000000, 300000000, 400000000, 500000000, 600000000,
	//            700000);
	//    f1(100000, 200000, 300000, 400000, 500000, 600000, f2(1, 2, 3, 4, 5, 6, 7));
	//    f1(100000, 200000, 300000, 400000, 500000, 600000,
	//            f2(1, 2, 3, 4, 5, 6, 70));
	//    f1(100000, 200000, 300000, 400000, 500000, f2(10, 20, 30, 40, 50, 60, 7000),
	//            700000);
	//    f1(100000, 200000, 300000, 400000, 500000,
	//            f2(10, 20, 30, 40, 50, 60, 70000), 700000);
	//}
	public void testFunctionCall_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//int function(int, int, int, int, int);
	//int function_with_a_long_name(int, int);
	//
	//void test() {
	//function_with_a_long_name(function(1000000, 2000000, 3000000, 4000000, 5000000), 6000000);
	//}

	//int function(int, int, int, int, int);
	//int function_with_a_long_name(int, int);
	//
	//void test() {
	//    function_with_a_long_name(
	//            function(1000000, 2000000, 3000000, 4000000, 5000000), 6000000);
	//}
	public void testFunctionCall_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//void function(int);
	//int function_with_a_looooooooooooooooooooooooooooooooong_name(int);
	//
	//void test() {
	//function(function_with_a_looooooooooooooooooooooooooooooooong_name(1000000));
	//}

	//void function(int);
	//int function_with_a_looooooooooooooooooooooooooooooooong_name(int);
	//
	//void test() {
	//    function(
	//            function_with_a_looooooooooooooooooooooooooooooooong_name(1000000));
	//}
	public void testFunctionCall_3() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//int function_with_a_long_name(int, int);
	//int function_with_an_even_looooooooooooooooonger_name(int, int);
	//
	//void test() {
	//function_with_a_long_name(function_with_an_even_looooooooooooooooonger_name(1000000,2000000),3000000);
	//function_with_a_long_name(function_with_an_even_looooooooooooooooonger_name(1000000,20000000),3000000);
	//}

	//int function_with_a_long_name(int, int);
	//int function_with_an_even_looooooooooooooooonger_name(int, int);
	//
	//void test() {
	//    function_with_a_long_name(
	//            function_with_an_even_looooooooooooooooonger_name(1000000, 2000000),
	//            3000000);
	//    function_with_a_long_name(
	//            function_with_an_even_looooooooooooooooonger_name(1000000,
	//                    20000000), 3000000);
	//}
	public void testFunctionCall_4() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//template<typename T, typename U>
	//struct type_with_multiple_template_parameters {};
	//
	//void wrap_when_necessary(type_with_multiple_template_parameters<char, float> p1, int p2, int p3) {}
	//void wrap_when_necessary(type_with_multiple_template_parameters<float, float> p1, int p2, int p3) {}

	//template<typename T, typename U>
	//struct type_with_multiple_template_parameters {
	//};
	//
	//void wrap_when_necessary(type_with_multiple_template_parameters<char, float> p1,
	//        int p2, int p3) {
	//}
	//void wrap_when_necessary(
	//        type_with_multiple_template_parameters<float, float> p1, int p2,
	//        int p3) {
	//}
	public void testFunctionCallWithTemplates_Bug357300() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//void function(const char *s);
	//
	//void test() {
	//function("string literal"
	//"continuation of the string literal");
	//}

	//void function(const char *s);
	//
	//void test() {
	//    function("string literal"
	//             "continuation of the string literal");
	//}
	public void testFunctionCallWithMultilineStringLiteral() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//int x=static_cast < int > ( 0 ) ;

	//int x = static_cast<int>(0);
	public void testCppCast_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//int x=static_cast < int >( 0 ) ;

	//int x = static_cast<int> (0);
	public void testCppCast_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//template < typename T >
	//void foo ( T t ) ;
	//
	//void test() {
	//foo < const char* > ( "" ) ;
	//}

	//template<typename T>
	//void foo(T t);
	//
	//void test() {
	//    foo<const char*>("");
	//}
	public void testTemplateFunctionCall_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//template < typename T >
	//void foo ( T t ) ;
	//
	//void test() {
	//foo < const char* >( "" ) ;
	//}

	//template<typename T>
	//void foo(T t);
	//
	//void test() {
	//    foo<const char*> ("");
	//}
	public void testTemplateFunctionCall_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//template<typename T>
	//class A {
	//};
	//
	//A<int> a = new A <int> ();
	//A<int> b = A <int> ();

	//template<typename T>
	//class A {
	//};
	//
	//A<int> a = new A<int>();
	//A<int> b = A<int>();
	public void testTemplateConstructorCall() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define MY_MACRO int a; \
	//    int b; \
	//    int c();
	//
	//class asdf {
	//		MY_MACRO
	//
	//public:
	//		asdf();
	//~asdf();
	//};

	//#define MY_MACRO int a; \
	//    int b; \
	//    int c();
	//
	//class asdf {
	//	MY_MACRO
	//
	//public:
	//	asdf();
	//	~asdf();
	//};
	public void testMacroWithMultipleDeclarations_Bug242053() throws Exception {
		assertFormatterResult();
	}

	//#define STREAM GetStream()
	//class Stream {
	//Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//void test() {
	// // comment
	//STREAM << "text " << "text " << "text " << "text " << "text " << "text " << "text " << "text ";
	//}

	//#define STREAM GetStream()
	//class Stream {
	//    Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//void test() {
	//    // comment
	//    STREAM << "text " << "text " << "text " << "text " << "text " << "text "
	//            << "text " << "text ";
	//}
	public void testMacroAfterComment() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define MY_MACRO(a, b, c)
	//
	//MY_MACRO(abcdefghijklmnopqrstuvwxyz,25,"very very very very very very very very very very long text");
	//namespace ns {
	//MY_MACRO(abcdefghijklmnopqrstuvwxyz,25,"very very very very very very very very very very long text");
	//}

	//#define MY_MACRO(a, b, c)
	//
	//MY_MACRO(abcdefghijklmnopqrstuvwxyz, 25,
	//        "very very very very very very very very very very long text");
	//namespace ns {
	//MY_MACRO(abcdefghijklmnopqrstuvwxyz, 25,
	//        "very very very very very very very very very very long text");
	//}
	public void testFunctionStyleMacro_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define MY_MACRO(a, b, c) \
	//int a = b; \
	//const char s[] = c
	//
	//MY_MACRO(abcdefghijklmnopqrstuvwxyz,(25 + 3),"very very very very very very very very very very long text");

	//#define MY_MACRO(a, b, c) \
	//int a = b; \
	//const char s[] = c
	//
	//MY_MACRO( abcdefghijklmnopqrstuvwxyz,
	//          (25 + 3),
	//          "very very very very very very very very very very long text" );
	public void testFunctionStyleMacro_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_NEXT_PER_LINE_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION,
				CCorePlugin.INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_INVOCATION,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//#define MY_MACRO(x, b) switch (0) default: if (false)
	//
	//void func() {
	//MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000, 6000000 + 700000);
	//MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000, 6000000 + 7000000);
	//}

	//#define MY_MACRO(x, b) switch (0) default: if (false)
	//
	//void func() {
	//    MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000, 6000000 + 700000);
	//    MY_MACRO(1000000 + 2000000 + 3000000 + 4000000 + 5000000,
	//             6000000 + 7000000);
	//}
	public void testFunctionStyleMacro_3() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_NEXT_PER_LINE_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//void foo() {
	//for(int i=0;i<50;++i){}
	//}

	//void foo() {
	//	for (int i = 0 ; i < 50 ; ++i) {
	//	}
	//}
	public void testSpaceBeforeSemicolonInFor_Bug242232() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON_IN_FOR, CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//char *b, *const a;

	//char *b, *const a;
	public void testPreserveSpaceBetweenPointerModifierAndIdentifier_Bug243056() throws Exception {
		assertFormatterResult();
	}

	//#define FUNCTION_NAME myFunc
	//#define VARIABLE_NAME myVar
	//
	//void FUNCTION_NAME( void );
	//void FUNCTION_NAME( void )
	//{
	//int VARIABLE_NAME;
	//}

	//#define FUNCTION_NAME myFunc
	//#define VARIABLE_NAME myVar
	//
	//void FUNCTION_NAME(void);
	//void FUNCTION_NAME(void) {
	//	int VARIABLE_NAME;
	//}
	public void testPreserveNecessarySpace_Bug250969() throws Exception {
		assertFormatterResult();
	}

	//#define FOREVER1 for(;;)
	//#define FOREVER2 while(1)
	//
	//int main(int argc, char **argv) {
	//	FOREVER1 {
	//		doSomething();
	//	}
	//	FOREVER2 {
	//		doSomething();
	//	}
	//}

	//#define FOREVER1 for(;;)
	//#define FOREVER2 while(1)
	//
	//int main(int argc, char **argv) {
	//	FOREVER1 {
	//		doSomething();
	//	}
	//	FOREVER2 {
	//		doSomething();
	//	}
	//}
	public void testFormatterProblemsWithForeverMacro() throws Exception {
		assertFormatterResult();
	}

	//#define BLOCK { }
	//#define DOIT1() { }
	//#define DOIT2() do { } while(false)
	//#define ALWAYS if(true)
	//#define NEVER if(false)
	//#define FOREVER for(;;)
	//
	//void foo() {
	//	int i=0;
	//  if (true) DOIT1();
	//  if (true) DOIT2();
	//	for (;;) BLOCK
	//	ALWAYS BLOCK
	//	NEVER FOREVER BLOCK
	//	switch(i) {
	//	case 0: BLOCK
	//	}
	//}

	//#define BLOCK { }
	//#define DOIT1() { }
	//#define DOIT2() do { } while(false)
	//#define ALWAYS if(true)
	//#define NEVER if(false)
	//#define FOREVER for(;;)
	//
	//void foo() {
	//	int i = 0;
	//	if (true)
	//		DOIT1();
	//	if (true)
	//		DOIT2();
	//	for (;;)
	//		BLOCK
	//	ALWAYS
	//		BLOCK
	//	NEVER
	//		FOREVER
	//			BLOCK
	//	switch (i) {
	//	case 0:
	//		BLOCK
	//	}
	//}
	public void testCompoundStatementAsMacro_Bug244928() throws Exception {
		assertFormatterResult();
	}

	//#define BLOCK { }
	//#define ALWAYS if(true)
	//
	//void foo() {
	//ALWAYS BLOCK
	//}

	//#define BLOCK { }
	//#define ALWAYS if(true)
	//
	//void foo() {
	//	ALWAYS
	//		BLOCK
	//}
	public void testCompoundStatementAsMacro_Temp() throws Exception {
		assertFormatterResult();
	}

	//#define BLOCK { }
	//#define DOIT1() { }
	//#define DOIT2() do { } while(false)
	//#define ALWAYS if(true)
	//#define NEVER if(false)
	//#define FOREVER for(;;)
	//
	//void foo() {
	//	int i=0;
	//  if (true) DOIT1();
	//  if (true) DOIT2();
	//	for (;;) BLOCK
	//	ALWAYS BLOCK
	//	NEVER FOREVER BLOCK
	//	switch(i) {
	//	case 0: BLOCK
	//	}
	//}

	//#define BLOCK { }
	//#define DOIT1() { }
	//#define DOIT2() do { } while(false)
	//#define ALWAYS if(true)
	//#define NEVER if(false)
	//#define FOREVER for(;;)
	//
	//void
	//foo ()
	//{
	//  int i = 0;
	//  if (true)
	//    DOIT1();
	//  if (true)
	//    DOIT2();
	//  for (;;)
	//    BLOCK
	//  ALWAYS
	//    BLOCK
	//  NEVER
	//    FOREVER
	//      BLOCK
	//  switch (i)
	//    {
	//    case 0:
	//      BLOCK
	//    }
	//}
	public void testCompoundStatementAsMacroGNU_Bug244928() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getGNUSettings().getMap());
		assertFormatterResult();
	}

	//class Point {
	//public:
	//Point(int x, int y) : x(x), y(y) {}
	//
	//private:
	//int x;
	//int y;
	//};

	//class Point {
	//public:
	//    Point(int x, int y) :
	//            x(x), y(y) {
	//    }
	//
	//private:
	//    int x;
	//    int y;
	//};
	public void testConstructorInitializer_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//class Point {
	//public:
	//Point(int x, int y) : x(x), y(y) {}
	//
	//private:
	//int x;
	//int y;
	//};

	//class Point {
	//public:
	//    Point(int x, int y)
	//            : x(x),
	//              y(y) {
	//    }
	//
	//private:
	//    int x;
	//    int y;
	//};
	public void testConstructorInitializer_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
				CCorePlugin.INSERT);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
				CCorePlugin.DO_NOT_INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONSTRUCTOR_INITIALIZER_LIST,
				Integer.toString(Alignment.M_NEXT_PER_LINE_SPLIT | Alignment.M_INDENT_ON_COLUMN | Alignment.M_FORCE));
		assertFormatterResult();
	}

	//class Point {
	//public:
	//Point(int x, int y) : x(x), y(y) {}
	//
	//private:
	//int x;
	//int y;
	//};

	//class Point {
	//public:
	//    Point(int x, int y) : x(x), y(y) {
	//    }
	//
	//private:
	//    int x;
	//    int y;
	//};
	public void testConstructorInitializer_3() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
				CCorePlugin.DO_NOT_INSERT);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
				CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//class Point {
	//public:
	//Point(int x, int y) : x(x), y(y) {}
	//
	//private:
	//int x;
	//int y;
	//};

	//class Point {
	//public:
	//    Point(int x, int y) :
	//            x(x), y(y) {
	//    }
	//
	//private:
	//    int x;
	//    int y;
	//};
	public void testConstructorInitializer_4() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_BEFORE_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
				CCorePlugin.DO_NOT_INSERT);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_COLON_IN_CONSTRUCTOR_INITIALIZER_LIST,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//#define A (0)
	//#define B (1)
	//#define ARGS (A, B)
	//#define CALL foo ARGS
	//void zoo(void) {
	//        foo(A,B);
	//foo ARGS;
	//CALL;
	//#if X
	//                        if (1)
	//                        {
	//                                t = 1;
	//                        }
	//#endif
	//                }

	//#define A (0)
	//#define B (1)
	//#define ARGS (A, B)
	//#define CALL foo ARGS
	//void zoo(void) {
	//	foo(A, B);
	//	foo ARGS;
	//	CALL;
	//#if X
	//                        if (1)
	//                        {
	//                                t = 1;
	//                        }
	//#endif
	//}
	public void testMacroAsFunctionArguments_Bug253039() throws Exception {
		assertFormatterResult();
	}

	//#define assign1(uc1, uc2, uc3, uc4, val) \
	//      uc1##uc2##uc3##uc4 = val;
	//
	//#define assign2(ucn, val) ucn = val;
	//
	//void foo1(void)
	//{
	//int \U00010401\U00010401\U00010401\U00010402;
	//assign1(\U00010401, \U00010401, \U00010401, \U00010402, 4);
	//}
	//
	//void foo2(void)
	//{
	//int \U00010401\U00010401\U00010401\U00010402;
	//assign2(\U00010401\U00010401\U00010401\U00010402, 4);
	//}

	//#define assign1(uc1, uc2, uc3, uc4, val) \
	//      uc1##uc2##uc3##uc4 = val;
	//
	//#define assign2(ucn, val) ucn = val;
	//
	//void foo1(void) {
	//	int \U00010401\U00010401\U00010401\U00010402;
	//	assign1(\U00010401, \U00010401, \U00010401, \U00010402, 4);
	//}
	//
	//void foo2(void) {
	//	int \U00010401\U00010401\U00010401\U00010402;
	//	assign2(\U00010401\U00010401\U00010401\U00010402, 4);
	//}
	public void testUniversalCharacters_Bug255949() throws Exception {
		assertFormatterResult();
	}

	//void foo() throw(E1,E2);

	//void foo() throw ( E1, E2 );
	public void testWhitespaceOptionsForExceptionSpecification_Bug243567() throws Exception {
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_EXCEPTION_SPECIFICATION,
				CCorePlugin.INSERT);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_EXCEPTION_SPECIFICATION,
				CCorePlugin.INSERT);
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_EXCEPTION_SPECIFICATION,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//void Foo::bar() {
	//*this.*FncPointer () ;  this->*FncPointer( ); }

	//void Foo::bar() {
	//	*this.*FncPointer();
	//	this->*FncPointer();
	//}
	public void testDotStarAndArrowStarOperators_Bug257700() throws Exception {
		assertFormatterResult();
	}

	//void zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz1(unsigned char __attribute__((unused)) x, unsigned char __attribute__((unused)) y){;}

	//void zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz1(
	//		unsigned char __attribute__((unused)) x,
	//		unsigned char __attribute__((unused)) y) {
	//	;
	//}
	public void test__attribute__InParameterDecl_Bug206271() throws Exception {
		assertFormatterResult();
	}

	//#define assert(e) if(!(e)) printf("Failed assertion")
	//void test(){assert(1 > 0);}

	//#define assert(e) if(!(e)) printf("Failed assertion")
	//void test() {
	//	assert(1 > 0);
	//}

	public void testMacroFormatting1_Bug241819() throws Exception {
		assertFormatterResult();
	}

	//#define PRINT if(printswitch) printf
	//void test(){int i=0;PRINT("Watch the format");if(i>0){i=1;}}

	//#define PRINT if(printswitch) printf
	//void test() {
	//	int i = 0;
	//	PRINT("Watch the format");
	//	if (i > 0) {
	//		i = 1;
	//	}
	//}
	public void testMacroFormatting2_Bug241819() throws Exception {
		assertFormatterResult();
	}

	//#define MACRO(a, b) while (a) b
	//bool f();
	//void g();
	//void test() {
	//MACRO(f(), g());
	//int i = 0;
	//}

	//#define MACRO(a, b) while (a) b
	//bool f();
	//void g();
	//void test() {
	//    MACRO(f(), g());
	//    int i = 0;
	//}
	public void testMacroStatement() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define MACRO(a) a(const a&); void operator=(const a&)
	//
	//class Test{MACRO(Test);};

	//#define MACRO(a) a(const a&); void operator=(const a&)
	//
	//class Test {
	//    MACRO(Test);
	//};
	public void testMacroDeclaration() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define MACRO(a,b) f(a,b)
	//void f(bool b, int i);
	//int function_with_loooooooooooooooong_name();
	//int another_function_with_loooooong_name();
	//
	//void test(){
	//    MACRO("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"=="bbbbbbbbbbbbbbbbbbbbbbbbbbb",function_with_loooooooooooooooong_name()+another_function_with_loooooong_name());
	//}

	//#define MACRO(a,b) f(a,b)
	//void f(bool b, int i);
	//int function_with_loooooooooooooooong_name();
	//int another_function_with_loooooong_name();
	//
	//void test() {
	//    MACRO("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
	//                  == "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
	//          function_with_loooooooooooooooong_name()
	//                  + another_function_with_loooooong_name());
	//}
	public void testMacroArguments() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//bool member __attribute__ ((__unused__)) = false;

	//bool member __attribute__ ((__unused__)) = false;
	public void testPreserveSpaceBetweenNameAnd__attribute__Bug261967() throws Exception {
		assertFormatterResult();
	}

	//extern "C" void f(int i, char c, float x);

	//extern "C" void f(int i, char c, float x);
	public void testPreserveSpaceInExternCDeclaration() throws Exception {
		assertFormatterResult();
	}

	//#define X
	//
	//typedef X struct {
	//};

	//#define X
	//
	//typedef X struct {
	//};
	public void testPreserveNecessarySpace_Bug268962() throws Exception {
		assertFormatterResult();
	}

	//inline   typename A foo();
	//void   bar(const typename A x)  ;
	//static   typename A x  ;

	//inline typename A foo();
	//void bar(const typename A x);
	//static typename A x;
	public void testFormatterProblemsWithTypename_Bug269590() throws Exception {
		assertFormatterResult();
	}

	//void
	//foo();
	//int*
	//bar();

	//void
	//foo();
	//int*
	//bar();
	public void testPreserveNewlineBetweenTypeAndFunctionDeclarator() throws Exception {
		assertFormatterResult();
	}

	public void testFormatGeneratedClass_Bug272006() throws Exception {
		String original = "class \u5927\u5927\u5927\u5927\n" + "{\n" + "public:\n" + "	\u5927\u5927\u5927\u5927();\n"
				+ "	virtual ~\u5927\u5927\u5927\u5927();\n" + "};\n";
		String expected = "class \u5927\u5927\u5927\u5927 {\n" + "public:\n" + "	\u5927\u5927\u5927\u5927();\n"
				+ "	virtual ~\u5927\u5927\u5927\u5927();\n" + "};\n";
		assertFormatterResult(original, expected);
	}

	//void f() {
	//  Canvas1->MoveTo((50 + (24* 20 ) +xoff) *Scale,(200+yoff)*ScaleY);
	//  Canvas1->LineTo((67+(24*20) +xoff)*Scale,(200+yoff)*ScaleY);
	//  Canvas1->MoveTo((50+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)-1);
	//  Canvas1->LineTo((67+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)-1);
	//  Canvas1->MoveTo((50+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)+1);
	//  Canvas1->LineTo((67+(24*20) +xoff)*Scale,((200+yoff)*ScaleY)+1);
	//}

	//void f() {
	//	Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY);
	//	Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale, (200 + yoff) * ScaleY);
	//	Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale,
	//			((200 + yoff) * ScaleY) - 1);
	//	Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale,
	//			((200 + yoff) * ScaleY) - 1);
	//	Canvas1->MoveTo((50 + (24 * 20) + xoff) * Scale,
	//			((200 + yoff) * ScaleY) + 1);
	//	Canvas1->LineTo((67 + (24 * 20) + xoff) * Scale,
	//			((200 + yoff) * ScaleY) + 1);
	//}
	public void testScannerErrorWithIntegerFollowedByStar_Bug278118() throws Exception {
		assertFormatterResult();
	}

	//#define If  if (1 == 1){
	//#define Else } else {
	//#define EndElse }
	//
	//#define Try  try{
	//#define Catch } catch(...) {
	//#define EndCatch }
	//
	//int main() {
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//
	//	If
	//		cout << "OK" << endl;
	//	Else
	//		cout << "Strange" << endl;
	//	EndElse
	//
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//
	//	return 0;
	//}

	//#define If  if (1 == 1){
	//#define Else } else {
	//#define EndElse }
	//
	//#define Try  try{
	//#define Catch } catch(...) {
	//#define EndCatch }
	//
	//int main() {
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//
	//	If
	//		cout << "OK" << endl;
	//	Else
	//		cout << "Strange" << endl;
	//	EndElse
	//
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//	Try
	//		cout << "OK2" << endl;
	//	Catch
	//		cout << "Exception" << endl;
	//	EndCatch
	//
	//	return 0;
	//}
	public void testControlStatementsAsMacro_Bug290630() throws Exception {
		assertFormatterResult();
	}

	//#define new new(__FILE__, __LINE__)
	//void func() {char* a = new    char[10];}

	//#define new new(__FILE__, __LINE__)
	//void func() {
	//	char *a = new char[10];
	//}
	public void testPlacementNewAsMacro_Bug298593() throws Exception {
		assertFormatterResult();
	}

	//#define MACRO(a) class b : public a
	//MACRO(aClass){ int a;};

	//#define MACRO(a) class b : public a
	//MACRO(aClass) {
	//	int a;
	//};
	public void testCompositeTypeSpecAsMacro_Bug298592() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//w_char* p   =  L"wide string literal";
	//int x = 0;
	//if (x == 0) x = 5;}

	//void f() {
	//	w_char *p = L"wide string literal";
	//	int x = 0;
	//	if (x == 0)
	//		x = 5;
	//}
	public void testWideStringLiteral_Bug292626() throws Exception {
		assertFormatterResult();
	}

	//#define INT (int)
	//int i = INT 1;

	//#define INT (int)
	//int i = INT 1;
	public void testCastAsMacro_Bug285901() throws Exception {
		assertFormatterResult();
	}

	//PARENT_T sample={.a=1,.b={a[2]=1,.b.c=2}};

	//PARENT_T sample = { .a = 1, .b = { a[2] = 1, .b.c = 2 } };
	public void testDesignatedInitializer_Bug314958() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_LANGUAGE, GCCLanguage.getDefault());
		assertFormatterResult();
	}

	//void extend_terminal_bond_to_label(vector<atom_t> &atom, const vector<letters_t> &letters, int n_letters, const vector<bond_t> &bond, int n_bond, const vector<label_t> &label, int n_label, double avg, double maxh, double max_dist_double_bond);

	//void extend_terminal_bond_to_label(vector<atom_t> &atom, const vector<letters_t> &letters, int n_letters,
	//                                   const vector<bond_t> &bond, int n_bond, const vector<label_t> &label, int n_label,
	//                                   double avg, double maxh, double max_dist_double_bond);
	public void testWrappingOfTemplateIdAsParameterType_Bug325783() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "120");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	////#define throws /* */
	//struct Foo {
	//    void foo() const throws {
	//    }
	//    void bar() const throws {
	//    }
	//};

	////#define throws /* */
	//struct Foo {
	//	void foo() const throws {
	//	}
	//	void bar() const throws {
	//	}
	//};
	public void testCodeCorruptionWithIllegalKeyword_Bug329165() throws Exception {
		assertFormatterResult();
	}

	//void extend_terminal_bond_to_label(vector<atom_t> &atom, const vector<letters_t> &letters, int n_letters, const vector<bond_t> &bond, int n_bond, const vector<label_t> &label, int n_label, double avg, double maxh, double max_dist_double_bond);

	//void extend_terminal_bond_to_label(vector<atom_t> &atom,
	//                                   const vector<letters_t> &letters,
	//                                   int n_letters, const vector<bond_t> &bond,
	//                                   int n_bond, const vector<label_t> &label,
	//                                   int n_label, double avg, double maxh,
	//                                   double max_dist_double_bond);
	public void testWrappingOfTemplateIdAsParameterType_Bug325783_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_PARAMETERS_IN_METHOD_DECLARATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "80");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//void f() {int array[5] = { 1, 2, 3, 4, 5 };for (int& x:array) x *= 2;}

	//void f() {
	//	int array[5] = { 1, 2, 3, 4, 5 };
	//	for (int &x : array)
	//		x *= 2;
	//}
	public void testRangeBasedFor_Bug328472() throws Exception {
		assertFormatterResult();
	}

	//int table[][] = {
	//   {1,2,3,4},
	//        			{ 1,   2, 3 ,  4},
	//{ 1,2,     3,4 },
	//        {1, 2,3, 4}
	//	};

	//int table[][] = {
	//		{ 1, 2, 3, 4 },
	//		{ 1, 2, 3, 4 },
	//		{ 1, 2, 3, 4 },
	//		{ 1, 2, 3, 4 }
	//};
	public void testKeepWrappedLines_Bug322776() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_JOIN_WRAPPED_LINES, DefaultCodeFormatterConstants.FALSE);
		assertFormatterResult();
	}

	//#define X() {  }
	//void g() {
	//	X();
	//		if (1) {
	//		x();
	//	}
	//	z();
	//}

	//#define X() {  }
	//void g() {
	//	X();
	//	if (1) {
	//		x();
	//	}
	//	z();
	//}
	public void testKeepWrappedLines_Bug322776_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_JOIN_WRAPPED_LINES, DefaultCodeFormatterConstants.FALSE);
		assertFormatterResult();
	}

	//void f() {
	//double confidence = 0.316030 //
	//- 0.016315 * C_Count //
	//+ 0.034336 * N_Count //
	//+ 0.066810 * O_Count //
	//+ 0.035674 * F_Count;
	//}

	//void f() {
	//	double confidence = 0.316030 //
	//						- 0.016315 * C_Count //
	//						+ 0.034336 * N_Count //
	//						+ 0.066810 * O_Count //
	//						+ 0.035674 * F_Count;
	//}
	public void testAlignmentOfBinaryExpression_Bug325787() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//void test() {
	//int variable1 = 1000000 < 2000000 ? 3000000 + 40000000 : 8000000 + 90000000;
	//int variable2 = 1000000 < 2000000 ? 3000000 + 40000000 : 8000000 + 900000000;
	//int variable3 = 1000000 < 2000000 ? 3000000 + 4000000 + 5000000 + 6000000 + 7000000 : 8000000 + 9000000;
	//int variable4 = 1000000 < 2000000 ? 3000000 + 4000000 + 5000000 + 6000000 + 7000000 : 8000000 + 90000000;
	//int variable5;
	//variable5 = 10000000 < 2000000 ? 3000000 + 4000000 + 5000000 + 6000000 : 700000;
	//variable5 = 10000000 < 2000000 ? 3000000 + 4000000 + 5000000 + 6000000 : 7000000;
	//}

	//void test() {
	//    int variable1 = 1000000 < 2000000 ? 3000000 + 40000000 : 8000000 + 90000000;
	//    int variable2 =
	//            1000000 < 2000000 ? 3000000 + 40000000 : 8000000 + 900000000;
	//    int variable3 =
	//            1000000 < 2000000 ?
	//                    3000000 + 4000000 + 5000000 + 6000000 + 7000000 :
	//                    8000000 + 9000000;
	//    int variable4 =
	//            1000000 < 2000000 ?
	//                    3000000 + 4000000 + 5000000 + 6000000 + 7000000 :
	//                    8000000 + 90000000;
	//    int variable5;
	//    variable5 =
	//            10000000 < 2000000 ? 3000000 + 4000000 + 5000000 + 6000000 : 700000;
	//    variable5 =
	//            10000000 < 2000000 ?
	//                    3000000 + 4000000 + 5000000 + 6000000 : 7000000;
	//}
	public void testConditionalExpression() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//int variable_with_a_long_name, another_variable_with_a_long_name;
	//
	//int variable = variable_with_a_long_name < another_variable_with_a_long_name ?
	//variable_with_a_long_name + another_variable_with_a_long_name :
	//variable_with_a_long_name * 2 > another_variable_with_a_long_name ?
	//variable_with_a_long_name + another_variable_with_a_long_name :
	//variable_with_a_long_name - another_variable_with_a_long_name;

	//int variable_with_a_long_name, another_variable_with_a_long_name;
	//
	//int variable =
	//        variable_with_a_long_name < another_variable_with_a_long_name ?
	//                variable_with_a_long_name + another_variable_with_a_long_name :
	//        variable_with_a_long_name * 2 > another_variable_with_a_long_name ?
	//                variable_with_a_long_name + another_variable_with_a_long_name :
	//                variable_with_a_long_name - another_variable_with_a_long_name;
	public void testConditionalExpressionChain() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//// Breaking at '<=' is preferred to breaking at '+'.
	//bool x = 1000000 + 2000000 + 3000000 + 4000000 <= 5000000 + 6000000 + 7000000 + 8000000;

	//// Breaking at '<=' is preferred to breaking at '+'.
	//bool x = 1000000 + 2000000 + 3000000 + 4000000
	//        <= 5000000 + 6000000 + 7000000 + 8000000;
	public void testBreakingPrecedence() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define m() f()
	//void f() {
	//if (1) f();
	//else m();
	//}

	//#define m() f()
	//void f() {
	//	if (1)
	//		f();
	//	else
	//		m();
	//}
	public void testMacroAfterElse() throws Exception {
		assertFormatterResult();
	}

	//#define M union { double u; void *s; long l; }
	//typedef M m_t;

	//#define M union { double u; void *s; long l; }
	//typedef M m_t;
	public void testMacroWithinTypedef() throws Exception {
		assertFormatterResult();
	}

	//#define B() { if (1+2) b(); }
	//void g() {
	//if (1) {
	//B();
	//} else {
	//x();
	//}
	//z();
	//}

	//#define B() { if (1+2) b(); }
	//void g() {
	//    if (1) {
	//        B();
	//    } else {
	//        x();
	//    }
	//    z();
	//}
	public void testBinaryExpressionInMacro() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//class Stream {
	//Stream& operator<<(const char* s);
	//};
	//
	//class Voidifier {
	//public:
	//void operator&(Stream&);
	//};
	//
	//Stream stream;
	//#define STREAM Voidifier() & stream
	//
	//void test() {
	//STREAM << "text text test text " << "text text " << "text text text text te";
	//}

	//class Stream {
	//    Stream& operator<<(const char *s);
	//};
	//
	//class Voidifier {
	//public:
	//    void operator&(Stream&);
	//};
	//
	//Stream stream;
	//#define STREAM Voidifier() & stream
	//
	//void test() {
	//    STREAM << "text text test text " << "text text "
	//            << "text text text text te";
	//}
	public void testOverloadedLeftShiftChain_1() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//class Stream {
	//Stream& operator<<(const char* s);
	//};
	//
	//class Voidifier {
	//public:
	//void operator&(Stream&);
	//};
	//
	//Stream stream;
	//#define STREAM Voidifier() & stream
	//
	//void test() {
	//STREAM << "text text test text " << "text text text text text " << "text" <<
	//"text text text text " << "text text text text text " << "text te";
	//}

	//class Stream {
	//    Stream& operator<<(const char *s);
	//};
	//
	//class Voidifier {
	//public:
	//    void operator&(Stream&);
	//};
	//
	//Stream stream;
	//#define STREAM Voidifier() & stream
	//
	//void test() {
	//    STREAM << "text text test text " << "text text text text text " << "text"
	//           << "text text text text " << "text text text text text "
	//           << "text te";
	//}
	public void testOverloadedLeftShiftChain_2() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//class Stream {
	//Stream& operator<<(const char *s);
	//};
	//const char* function();
	//
	//void text() {
	//Stream() << "0123456789012345678" << function() << "0123456789012345678" << "0123";
	//int i;
	//}

	//class Stream {
	//    Stream& operator<<(const char *s);
	//};
	//const char* function();
	//
	//void text() {
	//    Stream() << "0123456789012345678" << function() << "0123456789012345678"
	//             << "0123";
	//    int i;
	//}
	public void testOverloadedLeftShiftChain_3() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//class Stream {
	//Stream& operator<<(const char *s);
	//Stream& operator<<(int i);
	//};
	//
	//Stream stream;
	//int variable_with_a_long_name, another_variable_with_a_long_name;
	//
	//void test() {
	//stream << (variable_with_a_long_name + another_variable_with_a_long_name) * variable_with_a_long_name <<
	//"01234567890123456789";
	//}

	//class Stream {
	//    Stream& operator<<(const char *s);
	//    Stream& operator<<(int i);
	//};
	//
	//Stream stream;
	//int variable_with_a_long_name, another_variable_with_a_long_name;
	//
	//void test() {
	//    stream << (variable_with_a_long_name + another_variable_with_a_long_name)
	//                   * variable_with_a_long_name
	//           << "01234567890123456789";
	//}
	public void testOverloadedLeftShiftChain_4() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//struct Stream {
	//Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//#define MY_MACRO switch (0) case 0: default: GetStream()
	//
	//void test() {
	//MY_MACRO << "Loooooooooooooooooooong string literal" << " another literal.";
	//MY_MACRO << "Looooooooooooooooooooong string literal" << " another literal.";
	//}

	//struct Stream {
	//    Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//#define MY_MACRO switch (0) case 0: default: GetStream()
	//
	//void test() {
	//    MY_MACRO << "Loooooooooooooooooooong string literal" << " another literal.";
	//    MY_MACRO << "Looooooooooooooooooooong string literal"
	//             << " another literal.";
	//}
	public void testOverloadedLeftShiftChain_5() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//struct Stream {
	//Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//#define MY_MACRO switch (0) case 0: default: if (bool x = false) ; else GetStream()
	//
	//void test() {
	//MY_MACRO
	//<< "Loooooooooooooooooooong string literal" << " another literal.";
	//MY_MACRO
	//<< "Looooooooooooooooooooong string literal" << " another literal.";
	//}

	//struct Stream {
	//    Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//#define MY_MACRO switch (0) case 0: default: if (bool x = false) ; else GetStream()
	//
	//void test() {
	//    MY_MACRO << "Loooooooooooooooooooong string literal" << " another literal.";
	//    MY_MACRO << "Looooooooooooooooooooong string literal"
	//             << " another literal.";
	//}
	public void testOverloadedLeftShiftChain_6() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//bool loooooooooooong_name(int, int);
	//int loooong_name;
	//int very_loooooooooooooooooooooooong_name;
	//
	//struct Stream {
	//Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//struct Voidifier {
	//void operator&(Stream&);
	//};
	//
	//#define MY_MACRO(a) (a) ? (void) 0 : Voidifier() & GetStream() << " "
	//
	//void test(const char* variable_with_a_loooong_name) {
	//  MY_MACRO(loooooooooooong_name(loooong_name,
	//                                very_loooooooooooooooooooooooong_name))
	//      << variable_with_a_loooong_name;
	//}

	//bool loooooooooooong_name(int, int);
	//int loooong_name;
	//int very_loooooooooooooooooooooooong_name;
	//
	//struct Stream {
	//  Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//struct Voidifier {
	//  void operator&(Stream&);
	//};
	//
	//#define MY_MACRO(a) (a) ? (void) 0 : Voidifier() & GetStream() << " "
	//
	//void test(const char *variable_with_a_loooong_name) {
	//  MY_MACRO(loooooooooooong_name(loooong_name,
	//          very_loooooooooooooooooooooooong_name))
	//      << variable_with_a_loooong_name;
	//}
	public void testOverloadedLeftShiftChain_7() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "2");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}

	//struct Stream {
	//Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//struct Voidifier {
	//void operator&(Stream&);
	//};
	//
	//#define MY_MACRO(a) (a) ? (void) 0 : Voidifier() & GetStream() << " "
	//
	//void test() {
	//MY_MACRO(false)
	//<< "Loooooooooooooooooooooooooooooooooooooooong string literal";
	//}

	//struct Stream {
	//    Stream& operator <<(const char*);
	//};
	//Stream GetStream();
	//
	//struct Voidifier {
	//    void operator&(Stream&);
	//};
	//
	//#define MY_MACRO(a) (a) ? (void) 0 : Voidifier() & GetStream() << " "
	//
	//void test() {
	//    MY_MACRO(false)
	//            << "Loooooooooooooooooooooooooooooooooooooooong string literal";
	//}
	public void testOverloadedLeftShiftChain_Bug373034() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_OVERLOADED_LEFT_SHIFT_CHAIN,
				Integer.toString(Alignment.M_COMPACT_SPLIT | Alignment.M_INDENT_ON_COLUMN));
		assertFormatterResult();
	}
	//int main() {
	//	std::vector<std::vector<int>> test;
	//	// some comment
	//	return 0;
	//}

	//int main() {
	//	std::vector<std::vector<int>> test;
	//	// some comment
	//	return 0;
	//}
	public void testDoubleClosingAngleBrackets_Bug333816() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	int i;
	//	for (iiiiiiiiiiiiiiiiii = 0; iiiiiiiiiiiiiiiiii < 10; iiiiiiiiiiiiiiiiii++) {
	//	}
	//	foo();
	//}

	//void foo() {
	//	int i;
	//	for (iiiiiiiiiiiiiiiiii = 0; iiiiiiiiiiiiiiiiii < 10;
	//			iiiiiiiiiiiiiiiiii++) {
	//	}
	//	foo();
	//}
	public void testForLoopWrappingAtOpeningBrace() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "80");
		assertFormatterResult();
	}

	//void foo() {
	//	int i;
	//	for (i = 0; i < 10; i++) {
	//	}
	//	foo();
	//}

	//void foo() {
	//	int i;
	//	for (i = 0; i < 10; i++) {
	//	}
	//	foo();
	//}
	public void testForLoopKnR_Bug351399() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	int i;
	//	for (i = 0; i < 10; i++) {
	//	}
	//	foo();
	//}

	//void foo()
	//    {
	//    int i;
	//    for (i = 0; i < 10; i++)
	//	{
	//	}
	//    foo();
	//    }
	public void testForLoopWhitesmiths_Bug351399() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getWhitesmithsSettings().getMap());
		assertFormatterResult();
	}

	//void foo() {
	//	int i;
	//	for (i = 0; i < 10; i++) {
	//	}
	//	foo();
	//}

	//void
	//foo ()
	//{
	//  int i;
	//  for (i = 0; i < 10; i++)
	//    {
	//    }
	//  foo ();
	//}
	public void testForLoopGNU_Bug351399() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getGNUSettings().getMap());
		assertFormatterResult();
	}

	//void foo() {
	//	int i;
	//	for (i = 0; i < 10; i++) {
	//	}
	//	foo();
	//}

	//void foo()
	//{
	//	int i;
	//	for (i = 0; i < 10; i++)
	//	{
	//	}
	//	foo();
	//}
	public void testForLoopAllman_Bug351399() throws Exception {
		fOptions.putAll(DefaultCodeFormatterOptions.getAllmanSettings().getMap());
		assertFormatterResult();
	}

	//void f() {
	//	int i = static_cast<int>(5+1);
	//	int j;
	//}

	//void f() {
	//	int i = static_cast<int>(5 + 1);
	//	int j;
	//}
	public void testStaticCastInInitializer_Bug353974() throws Exception {
		assertFormatterResult();
	}

	//#define A 1
	//#define B 2
	//#define C 4
	//void f(int x, int y) {
	//	f(A|B|C,5);
	//	return;
	//}

	//#define A 1
	//#define B 2
	//#define C 4
	//void f(int x, int y) {
	//	f(A | B | C, 5);
	//	return;
	//}
	public void testMacroInBinaryExpression_Bug344379() throws Exception {
		assertFormatterResult();
	}

	public void testBackslashUInPreprocessorDirective_Bug350433() throws Exception {
		String before = "#include \"test\\udp.h\"\n";
		String expected = before;
		assertFormatterResult(before, expected);
	}

	//#define SIZE 5
	//char s0[5];
	//char s1[1+1];
	//char s2[SIZE];
	//char s3[SIZE+1];
	//char s4[SIZE+SIZE];
	//char s5[1+SIZE];

	//#define SIZE 5
	//char s0[5];
	//char s1[1 + 1];
	//char s2[SIZE];
	//char s3[SIZE + 1];
	//char s4[SIZE + SIZE];
	//char s5[1 + SIZE];
	public void testExpressionInArrayDeclarator_Bug350816() throws Exception {
		assertFormatterResult();
	}

	//void f(int p0 ,... ){}

	//void f(int p0, ...) {
	//}
	public void testEllipsisInFunctionDefinition_Bug350689() throws Exception {
		assertFormatterResult();
	}

	//struct{int n;}* l;
	//void f(int p0, int p1) { f((p0 + 2), l->n); }

	//struct {
	//	int n;
	//} *l;
	//void f(int p0, int p1) {
	//	f((p0 + 2), l->n);
	//}
	public void testParenthesizedExpressionInArgumentList_Bug350689() throws Exception {
		assertFormatterResult();
	}

	//#define m(x) { x=1; }
	//void f() {
	//	int i;
	//	if (1) i=1;
	//	else m(i);
	//}

	//#define m(x) { x=1; }
	//void f() {
	//	int i;
	//	if (1)
	//		i = 1;
	//	else
	//		m(i);
	//}
	public void testMacroInElseBranch_Bug350689() throws Exception {
		assertFormatterResult();
	}

	//#define EXPR(a) a
	//void f(){
	//switch(EXPR(1)){default:break;}
	//}

	//#define EXPR(a) a
	//void f() {
	//    switch (EXPR(1)) {
	//    default:
	//        break;
	//    }
	//}
	public void testMacroInSwitch() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		assertFormatterResult();
	}

	//#define IF(cond) if(cond){}
	//void f() { if(1){}IF(1>0);}

	//#define IF(cond) if(cond){}
	//void f() {
	//	if (1) {
	//	}
	//	IF(1 > 0);
	//}
	public void testMacroAfterCompoundStatement_Bug356690() throws Exception {
		assertFormatterResult();
	}

	//enum SomeEnum {
	//FirstValue,// first value comment
	//SecondValue// second value comment
	//};
	//enum OtherEnum {
	//First,// first value comment
	//Second,// second value comment
	//};

	//enum SomeEnum {
	//    FirstValue,  // first value comment
	//    SecondValue  // second value comment
	//};
	//enum OtherEnum {
	//    First,  // first value comment
	//    Second,  // second value comment
	//};
	public void testEnum() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, CCorePlugin.SPACE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_MIN_DISTANCE_BETWEEN_CODE_AND_LINE_COMMENT, "2");
		assertFormatterResult();
	}

	//#define TESTING(m) ;do{}while(0)
	//void f() {
	//	TESTING(1);
	//	if(Test(a) != 1) {
	//		status = ERROR;
	//	}
	//}

	//#define TESTING(m) ;do{}while(0)
	//void f() {
	//	TESTING(1);
	//	if (Test(a) != 1) {
	//		status = ERROR;
	//	}
	//}
	public void testDoWhileInMacro_Bug359658() throws Exception {
		assertFormatterResult();
	}

	//#define macro(x) NS::convert(x)
	//namespace NS {
	//int convert(int arg) {
	//return arg;
	//}
	//}
	//int main() {
	//int i = macro(42);
	//}

	//#define macro(x) NS::convert(x)
	//namespace NS {
	//int convert(int arg) {
	//	return arg;
	//}
	//}
	//int main() {
	//	int i = macro(42);
	//}
	public void testFunctionMacroInInitializerExpression() throws Exception {
		assertFormatterResult();
	}

	public void testCrLfAfterSingleLineComment_Bug442186() throws Exception {
		String before = "#define TESTING1 //\r\n#define TESTING2 // CR \r in comment\r\n";
		String expected = before;
		assertFormatterResult(before, expected);
	}

	//int abcde = 100; // line 1 of comment
	//				 // line 2 of comment

	//int abcde = 100; // line 1 of comment
	//				 // line 2 of comment
	public void testLineCommentAsBlocks1a() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_UP_LINE_COMMENT_IN_BLOCKS_ON_FIRST_COLUMN,
				DefaultCodeFormatterConstants.TRUE);
		assertFormatterResult();
	}

	//int abcde = 100; // line 1 of comment
	//				 // line 2 of comment

	//int abcde = 100; // line 1 of comment
	//// line 2 of comment
	public void testLineCommentAsBlocks1b() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_UP_LINE_COMMENT_IN_BLOCKS_ON_FIRST_COLUMN,
				DefaultCodeFormatterConstants.FALSE);
		assertFormatterResult();
	}

	//void x() {
	//	int abcde = 100; // line 1 of comment
	//					 // line 2 of comment
	//}

	//void x() {
	//	int abcde = 100; // line 1 of comment
	//					 // line 2 of comment
	//}
	public void testLineCommentAsBlocks2() throws Exception {
		assertFormatterResult();
	}

	//  // line 1 of comment
	//// line 2 of comment

	//// line 1 of comment
	//// line 2 of comment
	public void testLineCommentAsBlocks3() throws Exception {
		assertFormatterResult();
	}

	//// line 1 of comment
	//  // line 2 of comment

	//// line 1 of comment
	//// line 2 of comment
	public void testLineCommentAsBlocks4() throws Exception {
		assertFormatterResult();
	}

	//  // line 1 of comment
	//  // line 2 of comment

	//// line 1 of comment
	//// line 2 of comment
	public void testLineCommentAsBlocks5() throws Exception {
		assertFormatterResult();
	}

	//// line 1 of comment
	//// line 2 of comment

	//// line 1 of comment
	//// line 2 of comment
	public void testLineCommentAsBlocks6() throws Exception {
		assertFormatterResult();
	}

	//int abcde = 100; // line 1 of comment
	//				 // line 2 of comment
	//
	//// line 1 of another comment block, delimited by blank line

	//int abcde = 100; // line 1 of comment
	//				 // line 2 of comment
	//
	//// line 1 of another comment block, delimited by blank line
	public void testLineCommentAsBlocks7() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_LINE_UP_LINE_COMMENT_IN_BLOCKS_ON_FIRST_COLUMN,
				DefaultCodeFormatterConstants.TRUE);
		assertFormatterResult();
	}

	//int main(void) { // line 1 of comment
	//				 // line 2 of comment
	//}

	//int main(void) { // line 1 of comment
	//				 // line 2 of comment
	//}
	public void testLineCommentAsBlocks8() throws Exception {
		assertFormatterResult();
	}

	//template<typename T>
	//struct Tpl {
	//};
	//Tpl<Tpl<Tpl<int>>>tpl3_int { };
	//Tpl<Tpl<Tpl<Tpl<int>>>>tpl4_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<int>>>>>tpl5_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<Tpl<int>>>>>>tpl6_int { };

	//template<typename T>
	//struct Tpl {
	//};
	//Tpl<Tpl<Tpl<int>>> tpl3_int { };
	//Tpl<Tpl<Tpl<Tpl<int>>>> tpl4_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<int>>>>> tpl5_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<Tpl<int>>>>>> tpl6_int { };
	public void testNestedTemplates_509150() throws Exception {
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_TEMPLATE_ARGUMENTS,
				CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//template<typename T>
	//struct Tpl {
	//};
	//Tpl<Tpl<Tpl<int>>>tpl3_int { };
	//Tpl<Tpl<Tpl<Tpl<int>>>>tpl4_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<int>>>>>tpl5_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<Tpl<int>>>>>>tpl6_int { };

	//template<typename T>
	//struct Tpl {
	//};
	//Tpl<Tpl<Tpl<int > > > tpl3_int { };
	//Tpl<Tpl<Tpl<Tpl<int > > > > tpl4_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<int > > > > > tpl5_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<Tpl<int > > > > > > tpl6_int { };
	public void testNestedTemplatesWithSpaces_509150() throws Exception {
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_TEMPLATE_ARGUMENTS,
				CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//template<typename T>
	//struct Tpl {
	//};
	//Tpl<Tpl<Tpl<int>> > tpl3_int { };
	//Tpl<Tpl<Tpl<Tpl<int>>> >tpl4_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<int>> >> >tpl5_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<Tpl<int>>> >> >tpl6_int { };

	//template<typename T>
	//struct Tpl {
	//};
	//Tpl<Tpl<Tpl<int>> > tpl3_int { };
	//Tpl<Tpl<Tpl<Tpl<int>>> > tpl4_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<int>> >> > tpl5_int { };
	//Tpl<Tpl<Tpl<Tpl<Tpl<Tpl<int>>> >> > tpl6_int { };
	public void testNestedTemplatesMixedSpacingUnchanged_509150() throws Exception {
		fOptions.put(
				DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_TEMPLATE_ARGUMENTS,
				CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//template<typename ...ARGS>
	//int count(ARGS ... args) {
	//	return sizeof...(ARGS);
	//}

	//template<typename ...ARGS>
	//int count(ARGS ... args) {
	//	return sizeof...(ARGS);
	//}
	public void testSizeofParameterPackFormat_464498() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if constexpr (constexpr bool k = true) {
	//	}
	//}

	//void foo() {
	//	if constexpr (constexpr bool k = true) {
	//	}
	//}
	public void testConstexprIfFormat_1() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if
	//	constexpr (constexpr bool k = true) {
	//	}
	//}

	//void foo() {
	//	if constexpr (constexpr bool k = true) {
	//	}
	//}
	public void testConstexprIfFormat_2() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if
	//
	//	constexpr
	//  (constexpr bool k = true) {
	//	}
	//}

	//void foo() {
	//	if
	//
	//	constexpr (constexpr bool k = true) {
	//	}
	//}
	public void testConstexprIfFormat_3() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if constexpr (constexpr bool k = true; k) {
	//	}
	//}

	//void foo() {
	//	if constexpr (constexpr bool k = true; k) {
	//	}
	//}
	public void testIfInitStatementFormat_1() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if
	//	constexpr (constexpr bool k = true; k) {
	//	}
	//}

	//void foo() {
	//	if constexpr (constexpr bool k = true; k) {
	//	}
	//}
	public void testIfInitStatementFormat_2() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if
	//
	//	constexpr
	//  (constexpr bool k = true; k) {
	//	}
	//}

	//void foo() {
	//	if
	//
	//	constexpr (constexpr bool k = true; k) {
	//	}
	//}
	public void testIfInitStatementFormat_3() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	if (constexpr bool k = true;k) {
	//	}
	//}

	//void foo() {
	//	if (constexpr bool k = true; k) {
	//	}
	//}
	public void testIfInitStatementFormat_4() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch (constexpr bool k = true; k) {
	//	}
	//}

	//void foo() {
	//	switch (constexpr bool k = true; k) {
	//	}
	//}

	public void testSwitchInitStatementFormat_1() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch
	//	(constexpr bool k = true; k) {
	//	}
	//}

	//void foo() {
	//	switch (constexpr bool k = true; k) {
	//	}
	//}
	public void testSwitchInitStatementFormat_2() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch
	//
	//
	//  (constexpr bool k = true; k) {
	//	}
	//}

	//void foo() {
	//	switch
	//
	//	(constexpr bool k = true; k) {
	//	}
	//}
	public void testSwitchInitStatementFormat_3() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch (constexpr bool k = true;k) {
	//	}
	//}

	//void foo() {
	//	switch (constexpr bool k = true; k) {
	//	}
	//}
	public void testSwitchInitStatementFormat_4() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch(int i{}){
	//	}
	//}

	//void foo() {
	//	switch (int i { }) {
	//	}
	//}
	public void testSwitchControllerDeclarationFormat_1() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch(  int i=42  ){
	//	}
	//}

	//void foo() {
	//	switch (int i = 42) {
	//	}
	//}
	public void testSwitchControllerDeclarationFormat_2() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch
	//	(int i{}){
	//	}
	//}

	//void foo() {
	//	switch (int i { }) {
	//	}
	//}
	public void testSwitchControllerDeclarationFormat_3() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	switch(constexpr bool k=true;int i{}){
	//	}
	//}

	//void foo() {
	//	switch (constexpr bool k = true; int i { }) {
	//	}
	//}
	public void testSwitchControllerDeclarationFormat_4() throws Exception {
		assertFormatterResult();
	}

	//namespace na {
	//inline namespace nb {
	//}
	//}

	//namespace na {
	//inline namespace nb {
	//}
	//}
	public void testInlineNamespace_Bug532849() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	switch (1) {
	//	[[foo]] case 1:
	//		break;
	//	[[foo]] default:
	//		break;
	//	}
	//}

	//void f() {
	//	switch (1) {
	//	[[foo]] case 1:
	//		break;
	//	[[foo]] default:
	//		break;
	//	}
	//}
	public void testFormatAttributedLabelStatements_Bug535266() throws Exception {
		assertFormatterResult();
	}

	//template<typename ... T>
	//void f(T ... a) {
	//	if (sizeof...(a)) {
	//	}
	//}

	//template<typename ... T>
	//void f(T ... a) {
	//	if (sizeof...(a)) {
	//	}
	//}
	public void testIndendtionSizeofParampack_535331() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	[[foo]]switch (true) {
	//	}
	//}

	//void f() {
	//	[[foo]] switch (true) {
	//	}
	//}
	public void testAttributedSwitchStatement_Bug535263_1() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	[[foo]] switch (true) [[bar]] {
	//	}
	//}

	//void f() {
	//	[[foo]] switch (true) [[bar]] {
	//	}
	//}
	public void testAttributedSwitchCompoundStatement_Bug535263_2() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	for (;;) {
	//		[[foo]]continue;
	//	}
	//}

	//void f() {
	//	for (;;) {
	//		[[foo]] continue;
	//	}
	//}
	public void testAttributedContinueStatement_Bug535278_1() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	for (;;) {
	//		[[foo]]break;
	//	}
	//}

	//void f() {
	//	for (;;) {
	//		[[foo]] break;
	//	}
	//}
	public void testAttributedBreakStatement_Bug535278_2() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	for (;;) {
	//		[[foo]]return;
	//	}
	//}

	//void f() {
	//	for (;;) {
	//		[[foo]] return;
	//	}
	//}
	public void testAttributedReturnStatement_Bug535278_3() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	for (;;) {
	//		[[foo]]goto label;
	//	}
	//	label: ;
	//}

	//void f() {
	//	for (;;) {
	//		[[foo]] goto label;
	//	}
	//	label: ;
	//}
	public void testAttributedGotoStatement_Bug535278_4() throws Exception {
		assertFormatterResult();
	}

	//void f() {
	//	for (;;) {
	//		goto label;
	//	}
	//	[[bar]]label: ;
	//}

	//void f() {
	//	for (;;) {
	//		goto label;
	//	}
	//	[[bar]] label: ;
	//}
	public void testAttributedGotoLabel_Bug535278_5() throws Exception {
		assertFormatterResult();
	}

	//namespace[[foo]]{
	//}
	//namespace[[foo]]NS  __attribute__((__visibility__("default"))){
	//}

	//namespace [[foo]] {
	//}
	//namespace [[foo]] NS __attribute__((__visibility__("default"))) {
	//}
	public void testAttributedNamesapces_Bug535274() throws Exception {
		assertFormatterResult();
	}

	//enum[[foo]]{};

	//enum [[foo]] {
	//};
	public void testAttributedAnonymousEnumDeclaration_Bug535256_1() throws Exception {
		assertFormatterResult();
	}

	//enum[[foo]] X{};

	//enum [[foo]] X {
	//};
	public void testAttributedNamedEnumDeclaration_Bug535256_2() throws Exception {
		assertFormatterResult();
	}

	//enum[[foo]]:int [[bar]]{};

	//enum [[foo]] : int [[bar]] {
	//};
	public void testAttributedNamedEnumDeclarationWithAttributedBaseSpecifier_Bug535256_3() throws Exception {
		assertFormatterResult();
	}

	//enum struct [[foo]] X{};

	//enum struct [[foo]] X {
	//};
	public void testAttributedNamedScopedEnumDeclaration_Bug535256_4() throws Exception {
		assertFormatterResult();
	}

	////@formatter:off
	//int
	//main(){
	//return
	//0
	//;}
	////@formatter:on

	////@formatter:off
	//int
	//main(){
	//return
	//0
	//;}
	////@formatter:on
	public void testOnOffTags() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_COMMENT_TAG, true);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ON_TAG, "@formatter:on");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_OFF_TAG, "@formatter:off");
		assertFormatterResult();
	}

	////@formatter:off
	//    void this_line_intentionally_indented() {
	// int x;
	// }
	////@formatter:on

	////@formatter:off
	//    void this_line_intentionally_indented() {
	// int x;
	// }
	////@formatter:on
	public void testOnOffTagsDoesNotChangeFirstLineIndent() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_COMMENT_TAG, true);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ON_TAG, "@formatter:on");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_OFF_TAG, "@formatter:off");
		assertFormatterResult();
	}

	//int code_before_inactive;
	//#if 0
	//    void this_line_intentionally_indented() {
	// int x;
	// }
	//#endif
	//int code_after_inactive;

	//int code_before_inactive;
	//#if 0
	//    void this_line_intentionally_indented() {
	// int x;
	// }
	//#endif
	//int code_after_inactive;
	public void testDoeNotFormatInactiveCode() throws Exception {
		assertFormatterResult();
	}

	//#if 0
	//    void this_line_intentionally_indented() {
	// int x;
	// }
	//#endif

	//#if 0
	//    void this_line_intentionally_indented() {
	// int x;
	// }
	//#endif
	public void testDoeNotFormatInactiveCodeEntireFile() throws Exception {
		assertFormatterResult();
	}

	//#define MYTMPL template<typename T>
	//MYTMPL
	//class Foo {
	//};

	//#define MYTMPL template<typename T>
	//MYTMPL
	//class Foo {
	//};
	public void testTemplateIdWithMacro1_Bug462566() throws Exception {
		assertFormatterResult();
	}

	//template<typename T>
	//struct myvec {
	//};
	//#define vi myvec<int>
	//vi v;

	//template<typename T>
	//struct myvec {
	//};
	//#define vi myvec<int>
	//vi v;
	public void testTemplateIdWithMacro2_Bug462566() throws Exception {
		assertFormatterResult();
	}

	//#define FOREACH_BAD for( Foreach_bad<int> fe; fe.i; ++fe.i )
	//void bar() {
	//	FOREACH_BAD
	//	{
	//		printf("loop body\n");
	//	}
	//}

	//#define FOREACH_BAD for( Foreach_bad<int> fe; fe.i; ++fe.i )
	//void bar() {
	//	FOREACH_BAD
	//	{
	//		printf("loop body\n");
	//	}
	//}
	public void testTemplateIdWithMacro3_Bug406231() throws Exception {
		assertFormatterResult();
	}

	//#define ForIndex(I,N) for (int I=0;I<int(N);I++)
	//int foo() {
	//	int s = 0;
	//	ForIndex(i, 10)
	//	{
	//		s += i;
	//	}
	//}

	//#define ForIndex(I,N) for (int I=0;I<int(N);I++)
	//int foo() {
	//	int s = 0;
	//	ForIndex(i, 10)
	//	{
	//		s += i;
	//	}
	//}
	public void testTemplateIdWithMacro4_Bug406231() throws Exception {
		assertFormatterResult();
	}

	//class data
	//{
	//public:
	//	template <class x> bool operator< (x const &n) const
	//	{
	//	    return n < 0;
	//	}
	//};
	////explicit instantiation
	//template bool data::operator< <int>(int const&) const;

	//class data {
	//public:
	//	template<class x> bool operator<(x const &n) const {
	//		return n < 0;
	//	}
	//};
	////explicit instantiation
	//template bool data::operator< <int>(int const&) const;
	public void testTemplateInstantiationOperatorLesser_Bug540252() throws Exception {
		assertFormatterResult();
	}

	//#define WW(x) std::ostringstream(x)
	//namespace some_namespace
	//{
	//	void func()
	//	{
	//		try
	//		{
	//			WW("1") << "2";
	//		}
	//		catch (const std::exception& e)
	//		{
	//			std::cout << "blah...." << std::endl;
	//		}
	//	}
	//}

	//#define WW(x) std::ostringstream(x)
	//namespace some_namespace {
	//void func() {
	//	try {
	//		WW("1") << "2";
	//	} catch (const std::exception &e) {
	//		std::cout << "blah...." << std::endl;
	//	}
	//}
	//}
	public void testFormmatterWithMacro_Bug543947() throws Exception {
		assertFormatterResult();
	}

	//struct __attribute__((packed))foo{
	//	char a;
	//	char b;
	//};

	//struct __attribute__((packed)) foo {
	//	char a;
	//	char b;
	//};
	public void testAttributesWithStructs1_Bug467346() throws Exception {
		assertFormatterResult();
	}

	//struct foo{
	//	char a;
	//	char b;
	//}__attribute__((packed));

	//struct foo {
	//	char a;
	//	char b;
	//} __attribute__((packed));
	public void testAttributesWithStructs2_Bug467346() throws Exception {
		assertFormatterResult();
	}

	//struct __attribute__((packed)){
	//	char a;
	//	char b;
	//}foo;

	//struct __attribute__((packed)) {
	//	char a;
	//	char b;
	//} foo;
	public void testAttributesWithStructs3_Bug467346() throws Exception {
		assertFormatterResult();
	}

	//extern "C" {
	//void func();
	//}

	//extern "C" {
	//	void func();
	//}
	public void testLinkage1_Bug299482() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_BODY_DECLARATIONS_COMPARE_TO_LINKAGE,
				DefaultCodeFormatterConstants.TRUE);
		assertFormatterResult();
	}

	//extern "C" {
	//void func();
	//}

	//extern "C"{
	//void func();
	//}
	public void testLinkage2_Bug299482() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_BRACE_IN_LINKAGE_DECLARATION,
				DefaultCodeFormatterConstants.FALSE);
		assertFormatterResult();
	}

	//extern "C" {
	//void func();
	//}

	//extern "C"
	//{
	//void func();
	//}
	public void testLinkage3_Bug299482() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_LINKAGE_DECLARATION,
				DefaultCodeFormatterConstants.NEXT_LINE);
		assertFormatterResult();
	}

	//#define EMPTY1(x)
	//#define EMPTY2(x)
	//int main() {
	//	EMPTY1(bool x = true);
	//	EMPTY2(bool x = true);
	//	return 0;
	//}

	//#define EMPTY1(x)
	//#define EMPTY2(x)
	//int main() {
	//	EMPTY1(bool x = true);
	//	EMPTY2(bool x = true);
	//	return 0;
	//}
	public void testEmptyMacros_Bug361768() throws Exception {
		assertFormatterResult();
	}

	//#define START_SECTION() do { int a = 0; } while (0)
	//void code() {
	//	START_SECTION();
	//}

	//#define START_SECTION() do { int a = 0; } while (0)
	//void code() {
	//	START_SECTION();
	//}
	public void testFormmatterWithMacroFuncStyle_Bug475349() throws Exception {
		assertFormatterResult();
	}

	//int main() {
	//	int i = 0;
	//	for(i = 0;i<3;i++){
	//	}
	//	return 0;
	//}

	//int main() {
	//	int i = 0;
	//	for (i = 0 ; i < 3 ; i++) {
	//	}
	//	return 0;
	//}
	public void testSpaceAfterSemicolonInFor_Bug453385() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON_IN_FOR, CCorePlugin.INSERT);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_SEMICOLON_IN_FOR, CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//#define bool bool
	//struct ARGS {
	//	bool _unprune;
	//	bool _distributed_timing;
	//};

	//#define bool bool
	//struct ARGS {
	//	bool _unprune;
	//	bool _distributed_timing;
	//};
	public void testBoolInStructWithMacro_Bug397710() throws Exception {
		assertFormatterResult();
	}

	///* @formatter:off */
	//int xx2(){string s1="abc";string s2="def";}
	///* @formatter:on */
	//
	///* @formatter:on */
	//int xx(){string s1="abc";string s2="def";}
	///* @formatter:off */
	///* @formatter:on */
	//int xx3(){string s1="abc";string s2="def";}

	///* @formatter:off */
	//int xx2(){string s1="abc";string s2="def";}
	///* @formatter:on */
	//
	///* @formatter:on */
	//int xx() {
	//	string s1 = "abc";
	//	string s2 = "def";
	//}
	///* @formatter:off */
	///* @formatter:on */
	//int xx3() {
	//	string s1 = "abc";
	//	string s2 = "def";
	//}
	public void testOnOffTags1_Bug546391() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_COMMENT_TAG, true);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ON_TAG, "@formatter:on");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_OFF_TAG, "@formatter:off");
		assertFormatterResult();
	}

	//int xx(){string s1="abc";string s2="def";}
	///* @formatter:off */

	//int xx() {
	//	string s1 = "abc";
	//	string s2 = "def";
	//}
	///* @formatter:off */
	public void testOnOffTags2_Bug546391() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_COMMENT_TAG, true);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ON_TAG, "@formatter:on");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_OFF_TAG, "@formatter:off");
		assertFormatterResult();
	}

	///* @formatter:off */
	//int xx(){string s1="abc";string s2="def";}
	///* @formatter:on
	//		*
	//	*/

	///* @formatter:off */
	//int xx(){string s1="abc";string s2="def";}
	///* @formatter:on
	//		*
	//	*/
	public void testOnOffTags3_Bug546391() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_USE_COMMENT_TAG, true);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ON_TAG, "@formatter:on");
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_OFF_TAG, "@formatter:off");
	}

	//namespace AA::BB {
	//int a;
	//}

	//namespace AA::BB {
	//int a;
	//}
	public void testNestedNamespace_Bug546221() throws Exception {
		assertFormatterResult();
	}

	//void someAction(int i) {
	//}
	//int foo() {
	//	auto f = static_cast<void (*)(int)>(&someAction);
	//}

	//void someAction(int i) {
	//}
	//int foo() {
	//	auto f = static_cast<void (*)(int)>(&someAction);
	//}
	public void testCastFuncDeclarator1_Bug390324() throws Exception {
		assertFormatterResult();
	}

	//void someAction(int i) {
	//}
	//int foo() {
	//	auto f = (void (*)(int)) (&someAction);
	//}

	//void someAction(int i) {
	//}
	//int foo() {
	//	auto f = (void (*)(int)) (&someAction);
	//}
	public void testCastFuncDeclarator2_Bug390324() throws Exception {
		assertFormatterResult();
	}

	//#define ONE
	//namespace n1 {
	//namespace n2 {
	//#ifdef ONE
	//int v1;
	//#elif defined(TWO)
	//int v2;
	//#endif
	//}
	//}
	//int main(){return 0;}

	//#define ONE
	//namespace n1 {
	//namespace n2 {
	//#ifdef ONE
	//int v1;
	//#elif defined(TWO)
	//int v2;
	//#endif
	//}
	//}
	//int main() {
	//	return 0;
	//}
	public void testNamespacesWithInactiveSections_Bug405049() throws Exception {
		assertFormatterResult();
	}

	//int main() {
	//	auto f = []() {
	//
	//		for(int c1 = 0; c1 < 3; c1 ++) {
	//			for(int i = 0; i < 5; i ++) {
	//				for(int c2 = 0; c2 < 3; c2 ++) {
	//					// keep me here
	//				}
	//			}
	//		}
	//	};
	//	f();
	//	return 0;
	//}

	//int main() {
	//	auto f = []() {
	//
	//		for (int c1 = 0; c1 < 3; c1++) {
	//			for (int i = 0; i < 5; i++) {
	//				for (int c2 = 0; c2 < 3; c2++) {
	//					// keep me here
	//				}
	//			}
	//		}
	//	};
	//	f();
	//	return 0;
	//}
	public void testAlignmentOfLambda1_Bug500000() throws Exception {
		assertFormatterResult();
	}

	//int main() {
	//	int n = 0;
	//	auto f = [=]()mutable{n= 20;};
	//	f();
	//	return 0;
	//}

	//int main() {
	//	int n = 0;
	//	auto f = [=]() mutable {
	//		n = 20;
	//	};
	//	f();
	//	return 0;
	//}
	public void testAlignmentOfLambda2_Bug500000() throws Exception {
		assertFormatterResult();
	}

	//int main() {
	//	int n = 0;
	//	auto f = [=]()throw(int)[[deprecated]]{throw 1;};
	//	f();
	//	return 0;
	//}

	//int main() {
	//	int n = 0;
	//	auto f = [=]() throw (int) [[deprecated]] {
	//		throw 1;
	//	};
	//	f();
	//	return 0;
	//}
	public void testAlignmentOfLambda3_Bug500000() throws Exception {
		assertFormatterResult();
	}

	//void foo() {
	//	int a;
	//	switch (a)
	//	default: {
	//		break;
	//	}
	//}

	//void foo() {
	//	int a;
	//	switch (a)
	//	default: {
	//		break;
	//	}
	//}
	public void testSwitchNoParen_Bug353022() throws Exception {
		assertFormatterResult();
	}

	//int main(int argc, char **argv) {
	//	goto foo;
	//	foo: for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}

	//int main(int argc, char **argv) {
	//	goto foo;
	//	foo:
	//	for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}
	public void testLabelIndentAndNewLine_Bug268404() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_LABEL_COMPARE_TO_STATEMENTS,
				DefaultCodeFormatterConstants.TRUE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//int main(int argc, char **argv) {
	//	goto foo;
	//	foo: for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}

	//int main(int argc, char **argv) {
	//	goto foo;
	//foo: for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}
	public void testLabelNoIndentNoNewLine_Bug268404() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_LABEL_COMPARE_TO_STATEMENTS,
				DefaultCodeFormatterConstants.FALSE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//int main(int argc, char **argv) {
	//	goto foo;
	//	foo: for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}

	//int main(int argc, char **argv) {
	//	goto foo;
	//	foo: for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}
	public void testLabelIndentNoNewLine_Bug268404() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_LABEL_COMPARE_TO_STATEMENTS,
				DefaultCodeFormatterConstants.TRUE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, CCorePlugin.DO_NOT_INSERT);
		assertFormatterResult();
	}

	//int main(int argc, char **argv) {
	//	goto foo;
	//	foo: for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}

	//int main(int argc, char **argv) {
	//	goto foo;
	//foo:
	//	for (int i = 0; i < 100; ++i) {
	//		goto foo;
	//	}
	//}
	public void testLabelNoIndentNewLine_Bug268404() throws Exception {
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INDENT_LABEL_COMPARE_TO_STATEMENTS,
				DefaultCodeFormatterConstants.FALSE);
		fOptions.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_LABEL, CCorePlugin.INSERT);
		assertFormatterResult();
	}

	//int main() {
	//	int x;
	//	x = {42};
	//}

	//int main() {
	//	int x;
	//	x = { 42 };
	//}
	public void testAssigmentWithInitList_Bug547684() throws Exception {
		assertFormatterResult();
	}
}

Back to the top