Chromium Code Reviews| 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..bdaeb49f8cf33490a48bfe3c01a86c7e620f1ed9 100644 |
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart |
| @@ -4,9 +4,12 @@ |
| library analyzer.test.generated.compile_time_error_code_test; |
| +import 'package:analyzer/src/generated/engine.dart' show ChangeSet; |
| 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:analyzer/src/string_source.dart'; |
| +import 'package:unittest/unittest.dart' show expect; |
| import '../reflective_tests.dart'; |
| import '../utils.dart'; |
| @@ -6043,6 +6046,20 @@ main() { |
| assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]); |
| } |
| + void test_uriDoesNotExist_import_then_unused_import() { |
| + Source source = addSource("import 'target.dart';"); |
| + computeLibrarySourceErrors(source); |
| + assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]); |
| + |
| + Source target = |
| + analysisContext.sources.firstWhere((s) => s.fullName == "/target.dart"); |
| + expect(target.modificationStamp, -1); |
|
Brian Wilkerson
2016/02/26 15:07:32
I'm not 100% certain, but given that most of our t
|
| + changeSource(target, ""); |
|
Brian Wilkerson
2016/02/26 15:07:32
When a file that didn't exist is created on disk,
skybrian
2016/02/26 18:09:01
I'm testing the case when the file hasn't been sav
Brian Wilkerson
2016/02/26 18:35:57
Ok. I just didn't realize that we had clients that
|
| + |
| + computeLibrarySourceErrors(source); |
| + assertErrors(source, [HintCode.UNUSED_IMPORT]); |
| + } |
| + |
| void test_uriDoesNotExist_part() { |
| Source source = addSource(r''' |
| library lib; |