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

Unified Diff: packages/dart_style/test/comments/expressions.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
« no previous file with comments | « packages/dart_style/test/comments/enums.unit ('k') | packages/dart_style/test/comments/functions.unit » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/comments/expressions.stmt
diff --git a/packages/dart_style/test/comments/expressions.stmt b/packages/dart_style/test/comments/expressions.stmt
new file mode 100644
index 0000000000000000000000000000000000000000..2bb2b3ac6ea252e8e248eaa6ae468648d2ee34ee
--- /dev/null
+++ b/packages/dart_style/test/comments/expressions.stmt
@@ -0,0 +1,88 @@
+40 columns |
+>>> trailing line comment after split
+someMethod(argument1, argument2, // comment
+argument3);
+<<<
+someMethod(
+ argument1,
+ argument2, // comment
+ argument3);
+>>> trailing line comment after non-split
+someMethod(argument1, argument2 // comment
+);
+<<<
+someMethod(
+ argument1, argument2 // comment
+ );
+>>> inside list literal
+['item' // comment
+];
+<<<
+[
+ 'item' // comment
+];
+>>> inside argument list
+foo(1 /* bang */, 2);
+<<<
+foo(1 /* bang */, 2);
+>>> no space between "(" and ")" and block comment
+foo( /* */ ) {}
+<<<
+foo(/* */) {}
+>>> space on left between block comment and ","
+foo(1,/* a */ 2 /* b */ , 3);
+<<<
+foo(1, /* a */ 2 /* b */, 3);
+>>> space between block comment and other tokens
+var/**/a/**/=/**/1/**/+/**/2;
+<<<
+var /**/ a /**/ = /**/ 1 /**/ + /**/ 2;
+>>> preserve space before comment in expression
+foo &&
+
+ // comment
+ bar;
+<<<
+foo &&
+
+ // comment
+ bar;
+>>> preserve comments before a sequence of operators
+1 /* a */ && 2 /* b */ && 3;
+<<<
+1 /* a */ && 2 /* b */ && 3;
+>>> no trailing space after operand preceding comment
+a
+ // comment
+ && b;
+<<<
+a
+ // comment
+ &&
+ b;
+>>> hard line caused by a comment before a nested line
+someFunction(//
+someExtremelyLongArgumentName).clamp();
+<<<
+someFunction(//
+ someExtremelyLongArgumentName)
+ .clamp();
+>>> line comment before binary operator
+{
+ // comment
+ 1 + 2;
+}
+<<<
+{
+ // comment
+ 1 + 2;
+}
+>>> force named args to split on line comment in positional
+function(argument, //
+ argument, named: argument, another: argument);
+<<<
+function(
+ argument, //
+ argument,
+ named: argument,
+ another: argument);
« no previous file with comments | « packages/dart_style/test/comments/enums.unit ('k') | packages/dart_style/test/comments/functions.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698