| 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 c1c09ca753ca501453939a62280dd645b0d296d5..3ba46e898290f598ebca2f8fa5191392562f1925 100644
|
| --- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
|
| +++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
|
| @@ -17,6 +17,7 @@ import 'package:watcher/watcher.dart';
|
|
|
| var _isFile = new isInstanceOf<File>();
|
| var _isFolder = new isInstanceOf<Folder>();
|
| +var _isFileSystemException = new isInstanceOf<FileSystemException>();
|
|
|
|
|
| main() {
|
| @@ -199,6 +200,21 @@ main() {
|
| expect(file.isOrContains('foo'), isFalse);
|
| });
|
|
|
| + group('modificationStamp', () {
|
| + test('exists', () {
|
| + new io.File(path).writeAsStringSync('contents');
|
| + File file = PhysicalResourceProvider.INSTANCE.getResource(path);
|
| + expect(file.modificationStamp, isNonNegative);
|
| + });
|
| +
|
| + test('does not exist', () {
|
| + File file = PhysicalResourceProvider.INSTANCE.getResource(path);
|
| + expect(() {
|
| + file.modificationStamp;
|
| + }, throwsA(_isFileSystemException));
|
| + });
|
| + });
|
| +
|
| test('shortName', () {
|
| expect(file.shortName, 'file.txt');
|
| });
|
|
|