Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Unified Diff: pkg/analyzer/test/file_system/physical_resource_provider_test.dart

Issue 952333002: Don't do folder existence checks when parsing pub list results. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3ba46e898290f598ebca2f8fa5191392562f1925..399bdc7b84428ea8c2efe7935397770148318c44 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
@@ -293,6 +293,28 @@ main() {
});
});
+ group('getChildAssumingFolder', () {
+ test('does not exist', () {
+ Folder child = folder.getChildAssumingFolder('no-such-resource');
+ expect(child, isNotNull);
+ expect(child.exists, isFalse);
+ });
+
+ test('file', () {
+ new io.File(join(path, 'myFile')).createSync();
+ Folder child = folder.getChildAssumingFolder('myFile');
+ expect(child, isNotNull);
+ expect(child.exists, isFalse);
+ });
+
+ test('folder', () {
+ new io.Directory(join(path, 'myFolder')).createSync();
+ Folder child = folder.getChildAssumingFolder('myFolder');
+ expect(child, isNotNull);
+ expect(child.exists, isTrue);
+ });
+ });
+
test('getChildren', () {
// create 2 files and 1 folder
new io.File(join(path, 'a.txt')).createSync();
« no previous file with comments | « pkg/analyzer/test/file_system/memory_file_system_test.dart ('k') | pkg/analyzer/test/source/package_map_provider_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698