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

Unified Diff: packages/dart_style/test/splitting/lists.stmt

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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: packages/dart_style/test/splitting/lists.stmt
diff --git a/packages/dart_style/test/splitting/lists.stmt b/packages/dart_style/test/splitting/lists.stmt
new file mode 100644
index 0000000000000000000000000000000000000000..e92600f54b35438e2deadeef60da634d006f7547
--- /dev/null
+++ b/packages/dart_style/test/splitting/lists.stmt
@@ -0,0 +1,168 @@
+40 columns |
+>>> empty list
+[];
+<<<
+[];
+>>> exactly 40 characters
+[first, second, third, fourth, seventh];
+<<<
+[first, second, third, fourth, seventh];
+>>>
+[first, second, third, fourth, fifth, sixth];
+<<<
+[
+ first,
+ second,
+ third,
+ fourth,
+ fifth,
+ sixth
+];
+>>> splits outer lists even if they fit
+[[first], [], [
+ second,[third], fourth] ];
+<<<
+[
+ [first],
+ [],
+ [
+ second,
+ [third],
+ fourth
+ ]
+];
+>>> split indirect outer
+[function([inner])];
+<<<
+[
+ function([inner])
+];
+>>> empty literal does not force outer split
+[[], {}, () {}];
+<<<
+[[], {}, () {}];
+>>> nested split list
+[first, [second, third, fourth], fifth, [sixth, seventh, eighth, nine, tenth,
+ eleventh]];
+<<<
+[
+ first,
+ [second, third, fourth],
+ fifth,
+ [
+ sixth,
+ seventh,
+ eighth,
+ nine,
+ tenth,
+ eleventh
+ ]
+];
+>>> force multi-line because of contained block
+[first, () {"fn";},third,fourth];
+<<<
+[
+ first,
+ () {
+ "fn";
+ },
+ third,
+ fourth
+];
+>>> spaces between items
+[1,2,3,4];
+<<<
+[1, 2, 3, 4];
+>>> dangling comma
+[1 , ];
+<<<
+[1,];
+>>> dangling comma multiline
+[first, second, third, fourth, fifth, sixth , ];
+<<<
+[
+ first,
+ second,
+ third,
+ fourth,
+ fifth,
+ sixth,
+];
+>>> nested lists are forced to split
+[[[[[argument, argument, argument, argument]]]]];
+<<<
+[
+ [
+ [
+ [
+ [
+ argument,
+ argument,
+ argument,
+ argument
+ ]
+ ]
+ ]
+ ]
+];
+>>> preserve newlines in lists containing a line comment
+[
+ // yeah
+ a,b,c,
+ d,e,f,
+];
+<<<
+[
+ // yeah
+ a, b, c,
+ d, e, f,
+];
+>>> wrap between elements even when newlines are preserved
+[
+ // yes
+ longElement,longElement,longElement,longElement,
+ longElement,longElement,longElement,longElement,longElement,longElement,
+];
+<<<
+[
+ // yes
+ longElement, longElement, longElement,
+ longElement,
+ longElement, longElement, longElement,
+ longElement, longElement, longElement,
+];
+>>> ignore line comment after the "]"
+[
+ a,b,c,
+ d
+] // comment
+;
+<<<
+[a, b, c, d] // comment
+ ;
+>>> preserves one blank line between elements
+[
+
+
+ element,
+
+
+
+ // comment
+ element,
+
+
+
+ element
+
+
+];
+<<<
+[
+ element,
+
+ // comment
+ element,
+
+ element
+];
« no previous file with comments | « packages/dart_style/test/splitting/list_arguments.stmt ('k') | packages/dart_style/test/splitting/loops.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698