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

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

Issue 105613003: Fix for map and list literal indentation (dartbug.com/15453). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/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/test/services/formatter_test.dart
===================================================================
--- pkg/analyzer/test/services/formatter_test.dart (revision 30874)
+++ pkg/analyzer/test/services/formatter_test.dart (working copy)
@@ -782,6 +782,16 @@
'var l = [1,2,3,4];',
'var l = [1, 2, 3, 4];'
);
+ expectStmtFormatsTo(
+ 'var l = [\n'
+ '1,\n'
+ '2,\n'
+ '];',
+ 'var l = [\n'
+ ' 1,\n'
+ ' 2,\n'
+ '];'
+ );
//Dangling ','
expectStmtFormatsTo(
'var l = [1,];',
@@ -795,6 +805,17 @@
'var map = const {"foo": "bar", "fuz": null};'
);
+ expectStmtFormatsTo(
+ 'var map = {\n'
+ '"foo": "bar",\n'
+ '"bar": "baz"'
+ '};',
+ 'var map = {\n'
+ ' "foo": "bar",\n'
+ ' "bar": "baz"'
+ '};'
+ );
+
//Dangling ','
expectStmtFormatsTo(
'var map = {"foo": "bar",};',
« no previous file with comments | « pkg/analyzer/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698