Index: pkg/analyzer/test/file_system/physical_resource_provider_test.dart |
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart |
index 39ac5dcfa4d41091f729dff256fc42aa28e82ac6..62b4bbafd0de1bae1d3ed5a3d13d883c8124e6a5 100644 |
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart |
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart |
@@ -97,6 +97,19 @@ class FileTest extends _BaseTest { |
expect(file.isOrContains('foo'), isFalse); |
} |
+ void test_lengthSync_doesNotExist() { |
+ File file = PhysicalResourceProvider.INSTANCE.getResource(path); |
+ expect(() { |
+ file.lengthSync; |
+ }, throwsA(_isFileSystemException)); |
+ } |
+ |
+ void test_lengthSync_exists() { |
+ List<int> bytes = <int>[1, 2, 3, 4, 5]; |
+ new io.File(path).writeAsBytesSync(bytes); |
+ expect(file.lengthSync, bytes.length); |
+ } |
+ |
void test_modificationStamp_doesNotExist() { |
File file = PhysicalResourceProvider.INSTANCE.getResource(path); |
expect(() { |