Index: pkg/analyzer/test/file_system/memory_file_system_test.dart |
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart |
index abc373f6d2237d8e98902af3e2e894b59214acca..cb39b49924d876915435b1e9d97d14f859bf43e5 100644 |
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart |
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart |
@@ -111,6 +111,20 @@ class FileTest { |
expect(file.isOrContains(provider.convertPath('/foo/bar')), isFalse); |
} |
+ void test_lengthSync_doesNotExist() { |
+ File file = provider.getResource(provider.convertPath('/test.txt')); |
+ expect(() { |
+ file.lengthSync; |
+ }, throwsA(_isFileSystemException)); |
+ } |
+ |
+ void test_lengthSync_exists() { |
+ List<int> bytes = <int>[1, 2, 3, 4, 5]; |
+ File file = |
+ provider.newFileWithBytes(provider.convertPath('/file.bin'), bytes); |
+ expect(file.lengthSync, bytes.length); |
+ } |
+ |
void test_modificationStamp_doesNotExist() { |
String path = provider.convertPath('/foo/bar/file.txt'); |
File file = provider.newFile(path, 'qwerty'); |