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

Unified Diff: pkg/analyzer/test/file_system/physical_resource_provider_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/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 75bfcb2a31de49a5adb886b4d43464869a4693ac..4a573014072d2092684dde2b9eadf9f1bf0372cc 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
@@ -173,6 +173,12 @@ main() {
expect(file == file2, isFalse);
});
+ test('isOrContains', () {
+ File file = PhysicalResourceProvider.INSTANCE.getResource(path);
+ expect(file.isOrContains(path), isTrue);
+ expect(file.isOrContains('foo'), isFalse);
+ });
+
test('shortName', () {
expect(file.shortName, 'file.txt');
});
@@ -222,6 +228,13 @@ main() {
expect(folder.contains(path), isFalse);
});
+ test('isOrContains', () {
+ expect(folder.isOrContains(path), isTrue);
+ expect(folder.isOrContains(join(path, 'aaa.txt')), isTrue);
+ expect(folder.isOrContains(join(path, 'aaa', 'bbb.txt')), isTrue);
+ expect(folder.isOrContains(join(tempPath, 'baz.txt')), isFalse);
+ });
+
group('getChild', () {
test('does not exist', () {
var child = folder.getChild('no-such-resource');

Powered by Google App Engine
This is Rietveld 408576698