Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: pkg/analyzer_experimental/test/services/formatter_test.dart

Issue 19668003: Formatter check-point (blank-space preservation experiment). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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'

Powered by Google App Engine
This is Rietveld 408576698