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

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

Issue 562293002: Issue 20891. Produce Quick Fixes for annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 fa6530d8495a7c0965a6ac1d1fbf02e952d086e7..f50c8866516f27a5554b7d8fdd7dce69b7790f0b 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -960,6 +960,28 @@ main() {
''');
}
+ void test_importLibraryProject_withType_annotation() {
+ addSource('/lib.dart', '''
+library lib;
+class Test {
+ const Test(int p);
+}
+''');
+ _indexTestUnit('''
+@Test(0)
+main() {
+}
+''');
+ performAllAnalysisTasks();
+ assertHasFix(FixKind.IMPORT_LIBRARY_PROJECT, '''
+import 'lib.dart';
+
+@Test(0)
+main() {
+}
+''');
+ }
+
void test_importLibraryProject_withType_inParentFolder() {
testFile = '/project/bin/test.dart';
addSource('/project/lib.dart', '''
@@ -1039,6 +1061,22 @@ main() {
''');
}
+ void test_importLibrarySdk_withTopLevelVariable_annotation() {
+ _indexTestUnit('''
+@PI
+main() {
+}
+''');
+ performAllAnalysisTasks();
+ assertHasFix(FixKind.IMPORT_LIBRARY_SDK, '''
+import 'dart:math';
+
+@PI
+main() {
+}
+''');
+ }
+
void test_importLibrarySdk_withType_invocationTarget() {
_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