Chromium Code Reviews| Index: pkg/analyzer_experimental/test/services/formatter_test.dart |
| =================================================================== |
| --- pkg/analyzer_experimental/test/services/formatter_test.dart (revision 25110) |
| +++ pkg/analyzer_experimental/test/services/formatter_test.dart (working copy) |
| @@ -26,7 +26,7 @@ |
| 'class A {\n' |
| '}', |
| 'class A {\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -35,7 +35,7 @@ |
| 'class A { \n' |
| '}', |
| 'class A {\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -44,7 +44,7 @@ |
| 'class A {\n' |
| ' }', |
| 'class A {\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -53,7 +53,7 @@ |
| ' class A {\n' |
| '}', |
| 'class A {\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -66,7 +66,7 @@ |
| 'class A {\n' |
| ' void x() {\n' |
| ' }\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -79,7 +79,7 @@ |
| ' static bool x() {\n' |
| ' return true;\n' |
| ' }\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -90,7 +90,7 @@ |
| ' }', |
| 'class A {\n' |
| ' int x() => 42 + 3;\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| @@ -110,10 +110,37 @@ |
| ' return false;\n' |
| ' }\n' |
| ' }\n' |
| - '}' |
| + '}\n' |
| ); |
| }); |
| + test('CU (multiple members)', () { |
| + expectCUFormatsTo( |
| + 'class A {\n' |
| + '}\n' |
| + 'class B {\n' |
| + '}\n', |
| + 'class A {\n' |
| + '}\n' |
| + 'class B {\n' |
| + '}\n' |
| + ); |
| + }); |
| + |
| + test('CU (multiple members w/blanks)', () { |
| + expectCUFormatsTo( |
| + 'class A {\n' |
| + '}\n\n' |
| + 'class B {\n' |
| + '}\n', |
| + 'class A {\n' |
| + '}\n\n' |
| + 'class B {\n' |
| + '}\n' |
| + ); |
| + }); |
| + |
| + |
| test('stmt', () { |
| expectStmtFormatsTo( |
| 'if (true){\n' |