| Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| index 7c0c15adb3ea2c31093a0760f848b482c055c40e..50ea5db63d460f2b9e6662671b0ca5693bf5c256 100644
|
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| @@ -7,6 +7,7 @@ library analyzer.test.generated.compile_time_error_code_test;
|
| import 'package:analyzer/src/generated/error.dart';
|
| import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
|
| import 'package:analyzer/src/generated/source_io.dart';
|
| +import 'package:unittest/unittest.dart' show expect;
|
|
|
| import '../reflective_tests.dart';
|
| import '../utils.dart';
|
| @@ -6043,6 +6044,27 @@ main() {
|
| assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
|
| }
|
|
|
| + void test_uriDoesNotExist_import_then_fixed() {
|
| + Source source = addSource("import 'target.dart';");
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
|
| +
|
| + // Check that the file is represented as missing.
|
| + Source target =
|
| + analysisContext2.getSourcesWithFullName("/target.dart").first;
|
| + expect(analysisContext2.getModificationStamp(target), -1);
|
| +
|
| + // Add an overlay in the same way as AnalysisServer.
|
| + analysisContext2
|
| + ..setContents(target, "")
|
| + ..handleContentsChanged(target, null, "", true);
|
| +
|
| + // Make sure the error goes away.
|
| + // TODO(skybrian) why isn't there an unused import hint?
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [HintCode.UNUSED_IMPORT]);
|
| + }
|
| +
|
| void test_uriDoesNotExist_part() {
|
| Source source = addSource(r'''
|
| library lib;
|
|
|