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

Unified Diff: pkg/analysis_server/test/services/correction/assist_test.dart

Issue 747613002: Issue 21655. Don't import self when add type declaration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/assist_test.dart
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index c344e0b7fdfb7257420f5e847f60d857960cfe0a..31fcc4f352fb7e8f6fb5185b7e52e2a165cebe83 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -362,6 +362,23 @@ main() {
''');
}
+ void test_addTypeAnnotation_local_OK_localType() {
+ _indexTestUnit('''
+class C {}
+C f() => null;
+main() {
+ var x = f();
+}
+''');
+ assertHasAssistAt('x =', AssistKind.ADD_TYPE_ANNOTATION, '''
+class C {}
+C f() => null;
+main() {
+ C x = f();
+}
+''');
+ }
+
void test_addTypeAnnotation_local_OK_onInitializer() {
_indexTestUnit('''
main() {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698