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

Unified Diff: pkg/analyzer/test/services/data/wrap_tests.data

Issue 477373002: Improve formatting of variable declarations/assignments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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') | pkg/analyzer/test/services/formatter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/services/data/wrap_tests.data
diff --git a/pkg/analyzer/test/services/data/wrap_tests.data b/pkg/analyzer/test/services/data/wrap_tests.data
index 9d21517232f34f0fb9d8ce74d391e03760aacb65..87bcfab07e37572e30df6586e9f650117e0de177 100644
--- a/pkg/analyzer/test/services/data/wrap_tests.data
+++ b/pkg/analyzer/test/services/data/wrap_tests.data
@@ -10,15 +10,75 @@ main() {
c0123456789012345,
d0123456789012345];
}
->>> operators
+>>> assignment - initializer doesn't fit one line, wrap inside, keep name
main() {
- int result = a0123456789012345 * b0123456789012345 + c0123456789012345 * d0123456789012345;
+ result = myFunction(a0123456789012345 * b0123456789012345, c0123456789012345 * d0123456789012345);
+}
+<<<
+main() {
+ result = myFunction(
+ a0123456789012345 * b0123456789012345,
+ c0123456789012345 * d0123456789012345);
+}
+>>> assignment - initializer fits one line
+main() {
+ variableLoooooooooooooooong = functionLoooooooooooooooooooooooooooooooooooooong(1, 2, 3, 4);
+}
+<<<
+main() {
+ variableLoooooooooooooooong =
+ functionLoooooooooooooooooooooooooooooooooooooong(1, 2, 3, 4);
+}
+>>> assignment - initializer doesn't fit one line, name too long
+main() {
+ variableLooooooooooooooooooong = functionLoooooooooooooooooooooooooooooooooooong(a0123456789012345 * b0123456789012345, c0123456789012345 * d0123456789012345);
+}
+<<<
+main() {
+ variableLooooooooooooooooooong =
+ functionLoooooooooooooooooooooooooooooooooooong(
+ a0123456789012345 * b0123456789012345,
+ c0123456789012345 * d0123456789012345);
+}
+>>> variable declaration - initializer doesn't fit one line, wrap inside, keep name
+main() {
+ var result = myFunction(a0123456789012345 * b0123456789012345, c0123456789012345 * d0123456789012345);
+}
+<<<
+main() {
+ var result = myFunction(
+ a0123456789012345 * b0123456789012345,
+ c0123456789012345 * d0123456789012345);
+}
+>>> variable declaration - initializer fits one line
+main() {
+ var variableLoooooooooooooooong = functionLoooooooooooooooooooooooooooooooooooong(1, 2, 3, 4);
+}
+<<<
+main() {
+ var variableLoooooooooooooooong =
+ functionLoooooooooooooooooooooooooooooooooooong(1, 2, 3, 4);
+}
+>>> variable declaration - initializer doesn't fit one line, name too long
+main() {
+ var variableLoooooooooooooooong = functionLoooooooooooooooooooooooooooooooooooong(a0123456789012345 * b0123456789012345, c0123456789012345 * d0123456789012345);
+}
+<<<
+main() {
+ var variableLoooooooooooooooong =
+ functionLoooooooooooooooooooooooooooooooooooong(
+ a0123456789012345 * b0123456789012345,
+ c0123456789012345 * d0123456789012345);
+}
+>>> variable declaration - with binary expression
+main() {
+ int result = a01234567890123456789 * b01234567890123456789 + c01234567890123456789 * d01234567890123456789;
}
<<<
main() {
int result =
- a0123456789012345 * b0123456789012345 +
- c0123456789012345 * d0123456789012345;
+ a01234567890123456789 * b01234567890123456789 +
+ c01234567890123456789 * d01234567890123456789;
}
>>> arguments
main() {
« no previous file with comments | « pkg/analyzer/lib/src/services/writer.dart ('k') | pkg/analyzer/test/services/formatter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698