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

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

Issue 25609002: Formatting constructor initializers a la the Style Guide. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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_experimental/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_experimental/test/services/formatter_test.dart
===================================================================
--- pkg/analyzer_experimental/test/services/formatter_test.dart (revision 28103)
+++ pkg/analyzer_experimental/test/services/formatter_test.dart (working copy)
@@ -598,7 +598,8 @@
'}\n',
'class A {\n'
' int _a;\n'
- ' A(a) : _a = a;\n'
+ ' A(a)\n'
+ ' : _a = a;\n'
'}\n'
);
});
@@ -622,6 +623,20 @@
'part of foo;\n'
);
});
+
+ test('CU (cons inits)', () {
+ expectCUFormatsTo('class X {\n'
+ ' var x, y;\n'
+ ' X() : x = 1, y = 2;\n'
+ '}\n',
+ 'class X {\n'
+ ' var x, y;\n'
+ ' X()\n'
+ ' : x = 1,\n'
+ ' y = 2;\n'
+ '}\n'
+ );
+ });
test('stmt', () {
expectStmtFormatsTo(
« no previous file with comments | « pkg/analyzer_experimental/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698