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

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

Issue 456893002: Support for excluded files/folders. (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 a91aa4b42fb918cf4823298318e635e6dec44d9e..2a7b669b5e74b90a1c459f19e87682cdb2288b09 100644
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -260,6 +260,13 @@ main() {
expect(file1.hashCode, equals(file2.hashCode));
});
+ test('isOrContains', () {
+ String path = '/foo/bar/file.txt';
+ File file = provider.getResource(path);
+ expect(file.isOrContains(path), isTrue);
+ expect(file.isOrContains('/foo/bar'), isFalse);
+ });
+
test('shortName', () {
File file = provider.getResource('/foo/bar/file.txt');
expect(file.shortName, 'file.txt');
@@ -310,6 +317,13 @@ main() {
expect(folder.contains('/foo/bar'), isFalse);
});
+ test('isOrContains', () {
+ expect(folder.isOrContains('/foo/bar'), isTrue);
+ expect(folder.isOrContains('/foo/bar/aaa.txt'), isTrue);
+ expect(folder.isOrContains('/foo/bar/aaa/bbb.txt'), isTrue);
+ expect(folder.isOrContains('/baz.txt'), isFalse);
+ });
+
group('getChild', () {
test('does not exist', () {
File file = folder.getChild('file.txt');

Powered by Google App Engine
This is Rietveld 408576698