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

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

Issue 319063004: Formatter: don't indent EOL comment at the beginning of a line. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
« no previous file with comments | « pkg/analyzer/lib/src/services/writer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/services/formatter_test.dart
diff --git a/pkg/analyzer/test/services/formatter_test.dart b/pkg/analyzer/test/services/formatter_test.dart
index 85e68aa5e4f87307a7309924652b07bee862dd16..5ebaa88869d1ed5b737370fb4a529dda43fc47cf 100644
--- a/pkg/analyzer/test/services/formatter_test.dart
+++ b/pkg/analyzer/test/services/formatter_test.dart
@@ -184,6 +184,30 @@ main() {
'class C {\n'
'}\n'
);
+ expectCUFormatsTo(
+ 'main() {\n'
+ '// print(1);\n'
+ '// print(2);\n'
+ ' print(3);\n'
+ '}\n',
+ 'main() {\n'
+ '// print(1);\n'
+ '// print(2);\n'
+ ' print(3);\n'
+ '}\n'
+ );
+ expectCUFormatsTo(
+ 'class A {\n'
+ '// int a;\n'
+ '// int b;\n'
+ ' int c;\n'
+ '}\n',
+ 'class A {\n'
+ '// int a;\n'
+ '// int b;\n'
+ ' int c;\n'
+ '}\n'
+ );
});
test('CU - nested functions', () {
« no previous file with comments | « pkg/analyzer/lib/src/services/writer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698