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

Unified Diff: packages/dart_style/test/comments/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
« no previous file with comments | « packages/dart_style/test/command_line_test.dart ('k') | packages/dart_style/test/comments/enums.unit » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/comments/classes.unit
diff --git a/packages/dart_style/test/comments/classes.unit b/packages/dart_style/test/comments/classes.unit
new file mode 100644
index 0000000000000000000000000000000000000000..0f6c4a5f6f10bed9cbf232a75c4aa50e2950be23
--- /dev/null
+++ b/packages/dart_style/test/comments/classes.unit
@@ -0,0 +1,166 @@
+40 columns |
+>>> indented line comment (dartbug.com/16383)
+class A {
+ // comment
+}
+<<<
+class A {
+ // comment
+}
+>>> line comment on opening line
+class A { // comment
+}
+<<<
+class A {
+ // comment
+}
+>>> indented block comment
+class A {
+ /* comment */
+}
+<<<
+class A {
+ /* comment */
+}
+>>> block comment with trailing newline
+class A {/* comment */
+}
+<<<
+class A {
+ /* comment */
+}
+>>> block comment with leading newline
+class A {
+ /* comment */}
+<<<
+class A {
+ /* comment */
+}
+>>> inline block comment
+class A { /* comment */ }
+<<<
+class A {/* comment */}
+>>> multiple comments on opening line
+class A { /* first */ // second
+}
+<<<
+class A {
+ /* first */ // second
+}
+>>> multiple inline block comments
+class A { /* 1 */ /* 2 */ /* 3 */ }
+<<<
+class A {/* 1 */ /* 2 */ /* 3 */}
+>>> multiline trailing block comment
+class A { /* comment
+*/ }
+<<<
+class A {
+ /* comment
+*/
+}
+>>> lines comments at the start of the line in a class body
+class A {
+// int a;
+// int b;
+ int c;
+}
+<<<
+class A {
+// int a;
+// int b;
+ int c;
+}
+>>> block comment
+class C/* is cool */{
+ /* int */ foo(/* comment */) => 42;
+}
+<<<
+class C /* is cool */ {
+ /* int */ foo(/* comment */) => 42;
+}
+>>> block comment
+library foo;
+/* A long
+ * Comment
+*/
+class C /* is cool */ {
+ /* int */ foo() => 42;
+}
+<<<
+library foo;
+
+/* A long
+ * Comment
+*/
+class C /* is cool */ {
+ /* int */ foo() => 42;
+}
+>>> ensure blank line above doc comments
+class Foo {var a = 1;
+/// doc
+var b = 2;}
+<<<
+class Foo {
+ var a = 1;
+
+ /// doc
+ var b = 2;
+}
+>>> remove blank line before beginning of body
+class A {
+
+
+
+ // comment
+}
+<<<
+class A {
+ // comment
+}
+>>> nested flush left comment
+class Foo {
+ method() {
+// flush
+ }
+}
+<<<
+class Foo {
+ method() {
+// flush
+ }
+}
+>>> nested flush left after non-nested
+class Foo {
+ method() {
+ // ...
+// flush
+ }
+}
+<<<
+class Foo {
+ method() {
+ // ...
+// flush
+ }
+}
+>>> force doc comment between classes to have two newlines before
+class Foo {} /**
+*/
+class Bar {}
+<<<
+class Foo {}
+
+/**
+*/
+class Bar {}
+>>> force doc comment between classes to have newline after
+class Foo {}
+/**
+*/ class Bar {}
+<<<
+class Foo {}
+
+/**
+*/
+class Bar {}
« no previous file with comments | « packages/dart_style/test/command_line_test.dart ('k') | packages/dart_style/test/comments/enums.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698