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

Side by Side Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 2830733002: We cannot use relative URIs to reference files outside of a package. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.correction.fix; 5 library test.services.correction.fix;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart'; 9 import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
10 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart'; 10 import 'package:analysis_server/plugin/edit/fix/fix_dart.dart';
(...skipping 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 DartFixKind.IMPORT_LIBRARY_PROJECT3, 3373 DartFixKind.IMPORT_LIBRARY_PROJECT3,
3374 ''' 3374 '''
3375 import 'package:my_pkg/src/a.dart'; 3375 import 'package:my_pkg/src/a.dart';
3376 3376
3377 main() { 3377 main() {
3378 Test test = null; 3378 Test test = null;
3379 } 3379 }
3380 '''); 3380 ''');
3381 } 3381 }
3382 3382
3383 test_importLibraryProject_BAD_notInLib_BUILD() async {
3384 testFile = '/aaa/bin/test.dart';
3385 provider.newFile('/aaa/BUILD', '');
3386 provider.newFile('/bbb/BUILD', '');
3387 addSource('/bbb/test/lib.dart', 'class Test {}');
3388 await resolveTestUnit('''
3389 main() {
3390 Test t;
3391 }
3392 ''');
3393 performAllAnalysisTasks();
3394 await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT1);
3395 }
3396
3397 test_importLibraryProject_BAD_notInLib_pubspec() async {
3398 testFile = '/aaa/bin/test.dart';
3399 provider.newFile('/aaa/pubspec.yaml', 'name: aaa');
3400 provider.newFile('/bbb/pubspec.yaml', 'name: bbb');
3401 addSource('/bbb/test/lib.dart', 'class Test {}');
3402 await resolveTestUnit('''
3403 main() {
3404 Test t;
3405 }
3406 ''');
3407 performAllAnalysisTasks();
3408 await assertNoFix(DartFixKind.IMPORT_LIBRARY_PROJECT1);
3409 }
3410
3383 test_importLibraryProject_withClass_annotation() async { 3411 test_importLibraryProject_withClass_annotation() async {
3384 addSource( 3412 addSource(
3385 '/lib.dart', 3413 '/lib.dart',
3386 ''' 3414 '''
3387 library lib; 3415 library lib;
3388 class Test { 3416 class Test {
3389 const Test(int p); 3417 const Test(int p);
3390 } 3418 }
3391 '''); 3419 ''');
3392 await resolveTestUnit(''' 3420 await resolveTestUnit('''
(...skipping 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after
5984 6012
5985 @override 6013 @override
5986 final CompilationUnit unit; 6014 final CompilationUnit unit;
5987 6015
5988 @override 6016 @override
5989 final AnalysisError error; 6017 final AnalysisError error;
5990 6018
5991 _DartFixContextImpl(this.resourceProvider, this.getTopLevelDeclarations, 6019 _DartFixContextImpl(this.resourceProvider, this.getTopLevelDeclarations,
5992 this.analysisContext, this.astProvider, this.unit, this.error); 6020 this.analysisContext, this.astProvider, this.unit, this.error);
5993 } 6021 }
OLDNEW
« 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