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

Unified Diff: test/whitespace/compilation_unit.unit

Issue 1173663004: Insert a blank line before and after classes. (Closed) Base URL: https://github.com/dart-lang/dart_style.git@master
Patch Set: Created 5 years, 6 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 | « test/regression/168.unit ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/whitespace/compilation_unit.unit
diff --git a/test/whitespace/compilation_unit.unit b/test/whitespace/compilation_unit.unit
index 08372c06ad09d11a65aaced12604386535467999..f9289ac936254e1fec36a2813dd66b968a7175dd 100644
--- a/test/whitespace/compilation_unit.unit
+++ b/test/whitespace/compilation_unit.unit
@@ -61,13 +61,6 @@ class B = Base with Mixin;
var c = 1;
d() {}
->>> require at least a single newline between declarations
-class A {} class B = Base with Mixin; var c = 1; d() {}
-<<<
-class A {}
-class B = Base with Mixin;
-var c = 1;
-d() {}
>>> force two newlines between directives and declarations
library a; var b;
<<<
@@ -77,4 +70,34 @@ var b;
>>> dartbug.com/15912
abstract class A = B with C<E>;
<<<
-abstract class A = B with C<E>;
+abstract class A = B with C<E>;
+>>> blank line between classes
+class A {} class B {}
+<<<
+class A {}
+
+class B {}
+>>> blank line between variables and classes
+var a = 1; class B{} var c = 3;
+<<<
+var a = 1;
+
+class B {}
+
+var c = 3;
+>>> blank line between functions and classes
+a() {} class B{} c() {}
+<<<
+a() {}
+
+class B {}
+
+c() {}
+>>> require newline between non-class declarations
+var a = 1; var b = 1; c() {} d() {} var e = 1;
+<<<
+var a = 1;
+var b = 1;
+c() {}
+d() {}
+var e = 1;
« no previous file with comments | « test/regression/168.unit ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698