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

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

Issue 444193002: Add Folder.contains(path) and use it in ContextDirectoryManager. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 6023f9ef9b89e3ac1324f30f4875f23fdeaee03a..a91aa4b42fb918cf4823298318e635e6dec44d9e 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -303,6 +303,13 @@ main() {
expect(folder == folder2, isFalse);
});
+ test('contains', () {
+ expect(folder.contains('/foo/bar/aaa.txt'), isTrue);
+ expect(folder.contains('/foo/bar/aaa/bbb.txt'), isTrue);
+ expect(folder.contains('/baz.txt'), isFalse);
+ expect(folder.contains('/foo/bar'), isFalse);
+ });
+
group('getChild', () {
test('does not exist', () {
File file = folder.getChild('file.txt');

Powered by Google App Engine
This is Rietveld 408576698