| Index: pkg/analyzer/test/src/dart/analysis/file_state_test.dart
|
| diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
|
| index f61ecaacd8b35d3ea4cfa9464d45b6b50ddfc72f..b409d92a4d8885ac65b32b5480bda61eb491727b 100644
|
| --- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
|
| +++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
|
| @@ -601,6 +601,22 @@ class C {
|
| expect(file.apiSignature, signature);
|
| }
|
|
|
| + test_store_zeroLengthUnlinked() {
|
| + String path = _p('/test.dart');
|
| + provider.newFile(path, 'class A {}');
|
| +
|
| + // Get the file, prepare unlinked.
|
| + FileState file = fileSystemState.getFileForPath(path);
|
| + expect(file.unlinked, isNotNull);
|
| +
|
| + // Make the unlinked unit in the byte store zero-length, damaged.
|
| + byteStore.put(file.test.unlinkedKey, <int>[]);
|
| +
|
| + // Refresh should not fail, zero bytes in the store are ignored.
|
| + file.refresh();
|
| + expect(file.unlinked, isNotNull);
|
| + }
|
| +
|
| test_subtypedNames() {
|
| String path = _p('/test.dart');
|
| provider.newFile(path, r'''
|
|
|