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

Unified Diff: pkg/analyzer/test/file_system/memory_file_system_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/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 2dd95de9dd419e478ad486ee7817758c45bba982..4b1dc37a839846308f3dd2929696fa475c8714ba 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -16,8 +16,8 @@ import 'package:watcher/watcher.dart';
var _isFile = new isInstanceOf<File>();
-var _isFolder = new isInstanceOf<Folder>();
var _isFileSystemException = new isInstanceOf<FileSystemException>();
+var _isFolder = new isInstanceOf<Folder>();
main() {
@@ -377,6 +377,28 @@ main() {
});
});
+ group('getChildAssumingFolder', () {
+ test('does not exist', () {
+ Folder child = folder.getChildAssumingFolder('foldername');
+ expect(child, isNotNull);
+ expect(child.exists, isFalse);
+ });
+
+ test('file', () {
+ provider.newFile('/foo/bar/foldername', 'content');
+ Folder child = folder.getChildAssumingFolder('foldername');
+ expect(child, isNotNull);
+ expect(child.exists, isFalse);
+ });
+
+ test('folder', () {
+ provider.newFolder('/foo/bar/foldername');
+ Folder child = folder.getChildAssumingFolder('foldername');
+ expect(child, isNotNull);
+ expect(child.exists, isTrue);
+ });
+ });
+
test('getChildren', () {
provider.newFile('/foo/bar/a.txt', 'aaa');
provider.newFolder('/foo/bar/bFolder');

Powered by Google App Engine
This is Rietveld 408576698