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

Unified Diff: packages/dart_style/test/splitting/imports.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/splitting/imports.unit
diff --git a/packages/dart_style/test/splitting/imports.unit b/packages/dart_style/test/splitting/imports.unit
new file mode 100644
index 0000000000000000000000000000000000000000..64a379ae7a7132d5cedb7909b25407b3eead65c1
--- /dev/null
+++ b/packages/dart_style/test/splitting/imports.unit
@@ -0,0 +1,123 @@
+40 columns |
+>>> does not wrap long import string (#16366)
+import 'package:some/very/long/import/path.dart';
+<<<
+import 'package:some/very/long/import/path.dart';
+>>> wrap import at as
+import 'package:some/very/long/import/path.dart' as path;
+<<<
+import 'package:some/very/long/import/path.dart'
+ as path;
+>>> split before deferred
+import 'package:some/very/long/import/path.dart' deferred as path;
+<<<
+import 'package:some/very/long/import/path.dart'
+ deferred as path;
+>>> import keeps shows on one line
+import 'foo.dart'show Ape,Bear,Cat;
+<<<
+import 'foo.dart' show Ape, Bear, Cat;
+>>> import moves all shows to next line
+import 'foo.dart'show Ape,Bear,Cat,Dog;
+<<<
+import 'foo.dart'
+ show Ape, Bear, Cat, Dog;
+>>> import moves all shows each to their own line
+import 'foo.dart'show Ape,Bear,Cat,Dog,Echidna,FlyingFox,Gorilla;
+<<<
+import 'foo.dart'
+ show
+ Ape,
+ Bear,
+ Cat,
+ Dog,
+ Echidna,
+ FlyingFox,
+ Gorilla;
+>>> import keeps hides on one line
+import 'foo.dart'hide Ape,Bear,Cat;
+<<<
+import 'foo.dart' hide Ape, Bear, Cat;
+>>> import moves hides to next line
+import 'foo.dart'hide Ape,Bear,Cat,Dog;
+<<<
+import 'foo.dart'
+ hide Ape, Bear, Cat, Dog;
+>>> import moves hides each to their own line
+import 'foo.dart'hide Ape,Bear,Cat,Dog,Echidna,FlyingFox,Gorilla;
+<<<
+import 'foo.dart'
+ hide
+ Ape,
+ Bear,
+ Cat,
+ Dog,
+ Echidna,
+ FlyingFox,
+ Gorilla;
+>>> single line both
+import 'foo.dart'hide Ape show Bear;
+<<<
+import 'foo.dart' hide Ape show Bear;
+>>> multiline first
+import 'foo.dart'hide Ape,Bear,Cat,Dog, Echidna, FlyingFox show Ape,Bear,Cat,Dog;
+<<<
+import 'foo.dart'
+ hide
+ Ape,
+ Bear,
+ Cat,
+ Dog,
+ Echidna,
+ FlyingFox
+ show Ape, Bear, Cat, Dog;
+>>> multiline second
+import 'foo.dart'hide Ape,Bear,Cat,Dog show Ape,Bear,Cat,Dog, Echidna, FlyingFox;
+<<<
+import 'foo.dart'
+ hide Ape, Bear, Cat, Dog
+ show
+ Ape,
+ Bear,
+ Cat,
+ Dog,
+ Echidna,
+ FlyingFox;
+>>> multiline both
+import 'foo.dart'hide Ape,Bear,Cat,Dog, Echidna, FlyingFox show Ape,Bear,Cat,Dog, Echidna, FlyingFox;
+<<<
+import 'foo.dart'
+ hide
+ Ape,
+ Bear,
+ Cat,
+ Dog,
+ Echidna,
+ FlyingFox
+ show
+ Ape,
+ Bear,
+ Cat,
+ Dog,
+ Echidna,
+ FlyingFox;
+>>> double line both
+import 'foo.dart'hide Ape,Bear,Cat,Dog show Ape,Bear,Cat,Dog;
+<<<
+import 'foo.dart'
+ hide Ape, Bear, Cat, Dog
+ show Ape, Bear, Cat, Dog;
+>>> force both keywords to split even if first would fit on first line
+import 'foo.dart' hide Ape, Bear show Ape, Bear, Cat, Dog;
+<<<
+import 'foo.dart'
+ hide Ape, Bear
+ show Ape, Bear, Cat, Dog;
+>>> force split in list
+import 'foo.dart' hide First, //
+Second;
+<<<
+import 'foo.dart'
+ hide
+ First, //
+ Second;
« no previous file with comments | « packages/dart_style/test/splitting/function_arguments.stmt ('k') | packages/dart_style/test/splitting/invocations.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698