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

Unified Diff: packages/watcher/test/path_set_test.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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
« no previous file with comments | « packages/watcher/test/no_subscription/mac_os_test.dart ('k') | packages/watcher/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/watcher/test/path_set_test.dart
diff --git a/packages/watcher/test/path_set_test.dart b/packages/watcher/test/path_set_test.dart
index 13e797c20d93153e393d7bd9330d0c1bad36375e..d3420d377de1b57f8f2d6ece96d1f46e01bd5caf 100644
--- a/packages/watcher/test/path_set_test.dart
+++ b/packages/watcher/test/path_set_test.dart
@@ -6,8 +6,6 @@ import 'package:path/path.dart' as p;
import 'package:test/test.dart';
import 'package:watcher/src/path_set.dart';
-import 'utils.dart';
-
Matcher containsPath(String path) => predicate((set) =>
set is PathSet && set.contains(path),
'set contains "$path"');
@@ -42,10 +40,6 @@ void main() {
set.add(p.absolute("root/path/to/file"));
expect(set, containsPath("root/path/to/file"));
});
-
- test("that's not beneath the root throws an error", () {
- expect(() => set.add("path/to/file"), throwsArgumentError);
- });
});
group("removing a path", () {
@@ -78,7 +72,7 @@ void main() {
expect(set, isNot(containsPath("root/path/to/two")));
expect(set, isNot(containsPath("root/path/to/sub/three")));
});
-
+
test("that's a directory in the set removes and returns it and all files "
"beneath it", () {
set.add("root/path");
@@ -110,10 +104,6 @@ void main() {
expect(set.remove(p.absolute("root/path/to/file")),
unorderedEquals([p.normalize("root/path/to/file")]));
});
-
- test("that's not beneath the root throws an error", () {
- expect(() => set.remove("path/to/file"), throwsArgumentError);
- });
});
group("containsPath()", () {
@@ -143,10 +133,6 @@ void main() {
set.add("root/path/to/file");
expect(set, containsPath(p.absolute("root/path/to/file")));
});
-
- test("with a path that's not beneath the root throws an error", () {
- expect(() => set.contains("path/to/file"), throwsArgumentError);
- });
});
group("containsDir()", () {
@@ -198,13 +184,13 @@ void main() {
});
});
- group("toSet", () {
+ group("paths", () {
test("returns paths added to the set", () {
set.add("root/path");
set.add("root/path/to/one");
set.add("root/path/to/two");
- expect(set.toSet(), unorderedEquals([
+ expect(set.paths, unorderedEquals([
"root/path",
"root/path/to/one",
"root/path/to/two",
@@ -216,7 +202,7 @@ void main() {
set.add("root/path/to/two");
set.remove("root/path/to/two");
- expect(set.toSet(), unorderedEquals([p.normalize("root/path/to/one")]));
+ expect(set.paths, unorderedEquals([p.normalize("root/path/to/one")]));
});
});
@@ -227,7 +213,7 @@ void main() {
set.add("root/path/to/two");
set.clear();
- expect(set.toSet(), isEmpty);
+ expect(set.paths, isEmpty);
});
});
}
« no previous file with comments | « packages/watcher/test/no_subscription/mac_os_test.dart ('k') | packages/watcher/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698