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

Unified Diff: packages/dart_style/test/whitespace/compilation_unit.unit

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/whitespace/compilation_unit.unit
diff --git a/packages/dart_style/test/whitespace/compilation_unit.unit b/packages/dart_style/test/whitespace/compilation_unit.unit
new file mode 100644
index 0000000000000000000000000000000000000000..e173577a4e082daf032055c423d98832faac982e
--- /dev/null
+++ b/packages/dart_style/test/whitespace/compilation_unit.unit
@@ -0,0 +1,136 @@
+40 columns |
+>>> discard newlines before library
+
+
+library a;
+<<<
+library a;
+>>> discard newlines before first import
+
+
+import 'a.dart';
+<<<
+import 'a.dart';
+>>> discard newlines before first export
+
+
+export 'a.dart';
+<<<
+export 'a.dart';
+>>> discard newlines before first class
+
+
+class A {}
+<<<
+class A {}
+>>> discard newlines before first variable
+
+
+var a = 1;
+<<<
+var a = 1;
+>>> discard newlines before first function
+
+
+foo() {}
+<<<
+foo() {}
+>>> collapse extra newlines 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;
+<<<
+library a;
+
+var b;
+>>> dartbug.com/15912
+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;
+>>> require blank line after non-empty block-bodied members
+var a = 1; b() {;} c() => null; get d {;} get e => null; set f(value) {;
+} set g(value) => null; var h = 1;
+<<<
+var a = 1;
+b() {
+ ;
+}
+
+c() => null;
+get d {
+ ;
+}
+
+get e => null;
+set f(value) {
+ ;
+}
+
+set g(value) => null;
+var h = 1;
+>>> no required blank line after empty block-bodied members
+var a = 1; b() {} c() => null; get d {} get e => null; set f(value) {
+} set g(value) => null; var h = 1;
+<<<
+var a = 1;
+b() {}
+c() => null;
+get d {}
+get e => null;
+set f(value) {}
+set g(value) => null;
+var h = 1;
« no previous file with comments | « packages/dart_style/test/whitespace/classes.unit ('k') | packages/dart_style/test/whitespace/constructors.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698