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

Unified Diff: packages/dart_style/test/comments/top_level.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/comments/statements.stmt ('k') | packages/dart_style/test/formatter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/comments/top_level.unit
diff --git a/packages/dart_style/test/comments/top_level.unit b/packages/dart_style/test/comments/top_level.unit
new file mode 100644
index 0000000000000000000000000000000000000000..fbd7326e6788c6b968baa6f6adfc8e03522d9f6d
--- /dev/null
+++ b/packages/dart_style/test/comments/top_level.unit
@@ -0,0 +1,215 @@
+40 columns |
+>>> leading whitespace before top comment is deleted
+
+
+// comment
+<<<
+// comment
+>>>
+//comment one
+
+//comment two
+
+<<<
+//comment one
+
+//comment two
+>>>
+ /* foo */ /* bar */
+<<<
+/* foo */ /* bar */
+>>>
+var x; //x
+<<<
+var x; //x
+>>>
+library foo;
+
+/// Docs
+/// spanning
+/// lines.
+class A {
+}
+
+/// ... and
+
+/// Dangling ones too
+int x;
+<<<
+library foo;
+
+/// Docs
+/// spanning
+/// lines.
+class A {}
+
+/// ... and
+
+/// Dangling ones too
+int x;
+>>>
+library foo;
+
+//comment one
+
+class C {
+}
+<<<
+library foo;
+
+//comment one
+
+class C {}
+>>>
+library foo;
+
+//comment one
+
+//comment two
+
+class C {
+}
+<<<
+library foo;
+
+//comment one
+
+//comment two
+
+class C {}
+>>>
+import 'a.dart'; // a comment
+class Foo {}
+<<<
+import 'a.dart'; // a comment
+
+class Foo {}
+>>>
+import 'a.dart'; // a comment
+ // comment
+class Foo {}
+<<<
+import 'a.dart'; // a comment
+
+// comment
+class Foo {}
+>>>
+import 'a.dart'; /* a */ // b
+/* c */ // d
+class Foo {}
+<<<
+import 'a.dart'; /* a */ // b
+
+/* c */ // d
+class Foo {}
+>>>
+import 'a.dart';
+// a comment
+class Foo {}
+<<<
+import 'a.dart';
+
+// a comment
+class Foo {}
+>>>
+import 'a.dart';
+// import 'b.dart';
+class Foo {}
+<<<
+import 'a.dart';
+
+// import 'b.dart';
+class Foo {}
+>>>
+import 'a.dart';
+
+// a comment
+class Foo {}
+<<<
+import 'a.dart';
+
+// a comment
+class Foo {}
+>>>
+import 'a.dart';
+// a comment
+
+class Foo {}
+<<<
+import 'a.dart';
+// a comment
+
+class Foo {}
+>>> two lines between library and import
+library foo;
+import 'a.dart';
+<<<
+library foo;
+
+import 'a.dart';
+>>> two lines between library and export
+library foo;
+export 'a.dart';
+<<<
+library foo;
+
+export 'a.dart';
+>>> two lines between library and part
+library foo;
+part 'a.dart';
+<<<
+library foo;
+
+part 'a.dart';
+>>> before library name
+library/* c */foo;
+<<<
+library /* c */ foo;
+>>> block comment before "." in library
+library a/**/.b.c;
+<<<
+library a /**/ .b.c;
+>>> block comment after "." in library
+library a./**/b.c;
+<<<
+library a. /**/ b.c;
+>>> line comment before "." in library
+library a//
+.b.c;
+<<<
+library a //
+ .b.c;
+>>> line comment after "." in library
+library a.//
+b.c;
+<<<
+library a. //
+ b.c;
+>>> inline block comment between different kinds of directives
+library a; /* comment */ import 'b.dart';
+<<<
+library a;
+
+/* comment */
+import 'b.dart';
+>>> inline block comment between directives
+import 'a.dart'; /* comment */ import 'b.dart';
+<<<
+import 'a.dart';
+/* comment */
+import 'b.dart';
+>>> block comment between directives
+import 'a.dart'; /* comment */
+import 'b.dart';
+<<<
+import 'a.dart'; /* comment */
+import 'b.dart';
+>>> ensure blank line above doc comments
+var a = 1;
+/// doc
+var b = 2;
+<<<
+var a = 1;
+
+/// doc
+var b = 2;
« no previous file with comments | « packages/dart_style/test/comments/statements.stmt ('k') | packages/dart_style/test/formatter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698