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

Unified Diff: packages/dart_style/test/whitespace/classes.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/classes.unit
diff --git a/packages/dart_style/test/whitespace/classes.unit b/packages/dart_style/test/whitespace/classes.unit
new file mode 100644
index 0000000000000000000000000000000000000000..03d81d99fd893b8c7710bf368cab1b592ff1bc3c
--- /dev/null
+++ b/packages/dart_style/test/whitespace/classes.unit
@@ -0,0 +1,102 @@
+40 columns |
+>>> indentation
+class A {
+var z;
+inc(int x) => ++x;
+foo(int x) {
+if (x == 0) {
+return true;
+}}}
+<<<
+class A {
+ var z;
+ inc(int x) => ++x;
+ foo(int x) {
+ if (x == 0) {
+ return true;
+ }
+ }
+}
+>>> trailing space inside body
+class A {
+ }
+<<<
+class A {}
+>>> leading space before "class"
+ class A {
+}
+<<<
+class A {}
+>>>
+class A { int meaningOfLife() => 42; }
+<<<
+class A {
+ int meaningOfLife() => 42;
+}
+>>>
+class A {
+ }
+<<<
+class A {}
+>>>
+class A{var z;inc(int x) => ++x;}
+<<<
+class A {
+ var z;
+ inc(int x) => ++x;
+}
+>>> eats newlines
+abstract
+
+class
+
+
+A{}
+<<<
+abstract class A {}
+>>> native class
+class A extends B
+native
+"Zapp" {
+}
+<<<
+class A extends B native "Zapp" {}
+>>> require blank line after non-empty block-bodied members
+class Foo {
+var a = 1; b() {;} c() => null; get d {;} get e => null; set f(value) {;
+} set g(value) => null; var h = 1;}
+<<<
+class Foo {
+ 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
+class Foo {
+var a = 1; b() {} c() => null; get d {} get e => null; set f(value) {
+} set g(value) => null; var h = 1;}
+<<<
+class Foo {
+ 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/cascades.stmt ('k') | packages/dart_style/test/whitespace/compilation_unit.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698