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

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

Issue 2986903002: Add assist to convert part-of directives (Closed)
Patch Set: reworked Created 3 years, 5 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/assist_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/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 7cab51e58bde4d09f1a21e9a0988eaedd29722e3..16364881c36e07ee29f915921ca05125f451f910 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -1042,6 +1042,34 @@ build() {
''');
}
+ test_convertPartOfToUri_file_nonSibling() async {
+ addSource('/pkg/lib/foo.dart', '''
+library foo;
+part 'src/bar.dart';
+''');
+ testFile = provider.convertPath('/pkg/lib/src/bar.dart');
+ await resolveTestUnit('''
+part of foo;
+''');
+ await assertHasAssistAt('foo', DartAssistKind.CONVERT_PART_OF_TO_URI, '''
+part of '../foo.dart';
+''');
+ }
+
+ test_convertPartOfToUri_file_sibling() async {
+ addSource('/pkg/foo.dart', '''
+library foo;
+part 'bar.dart';
+''');
+ testFile = provider.convertPath('/pkg/bar.dart');
+ await resolveTestUnit('''
+part of foo;
+''');
+ await assertHasAssistAt('foo', DartAssistKind.CONVERT_PART_OF_TO_URI, '''
+part of 'foo.dart';
+''');
+ }
+
test_convertToBlockBody_BAD_noEnclosingFunction() async {
await resolveTestUnit('''
var v = 123;
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/assist_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698