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

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

Issue 913923002: Quick Fix for an undefined class in is/as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « pkg/analysis_server/lib/src/services/correction/fix_internal.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/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index d833738ee50c86151c2ca5b77d185caccb841560..9e33386efc5f7405bc9a2f13ba4bc4b408374f2a 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -1846,6 +1846,21 @@ main() {
''');
}
+ void test_importLibrarySdk_withType_AsExpression() {
+ _indexTestUnit('''
+main(p) {
+ p as Future;
+}
+''');
+ assertHasFix(FixKind.IMPORT_LIBRARY_SDK, '''
+import 'dart:async';
+
+main(p) {
+ p as Future;
+}
+''');
+ }
+
void test_importLibrarySdk_withType_invocationTarget() {
_indexTestUnit('''
main() {
@@ -1861,6 +1876,21 @@ main() {
''');
}
+ void test_importLibrarySdk_withType_IsExpression() {
+ _indexTestUnit('''
+main(p) {
+ p is Future;
+}
+''');
+ assertHasFix(FixKind.IMPORT_LIBRARY_SDK, '''
+import 'dart:async';
+
+main(p) {
+ p is Future;
+}
+''');
+ }
+
void test_importLibrarySdk_withType_typeAnnotation() {
_indexTestUnit('''
main() {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698