| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:path/path.dart' as p; | 5 import 'package:path/path.dart' as p; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 import 'package:watcher/src/path_set.dart'; | 7 import 'package:watcher/src/path_set.dart'; |
| 8 | 8 |
| 9 import 'utils.dart'; | 9 import 'utils.dart'; |
| 10 | 10 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 "root/path/to/one", | 211 "root/path/to/one", |
| 212 "root/path/to/two", | 212 "root/path/to/two", |
| 213 ].map(p.normalize))); | 213 ].map(p.normalize))); |
| 214 }); | 214 }); |
| 215 | 215 |
| 216 test("doesn't return paths removed from the set", () { | 216 test("doesn't return paths removed from the set", () { |
| 217 set.add("root/path/to/one"); | 217 set.add("root/path/to/one"); |
| 218 set.add("root/path/to/two"); | 218 set.add("root/path/to/two"); |
| 219 set.remove("root/path/to/two"); | 219 set.remove("root/path/to/two"); |
| 220 | 220 |
| 221 expect(set.toSet(), unorderedEquals([p.normalizze("root/path/to/one")])); | 221 expect(set.toSet(), unorderedEquals([p.normalize("root/path/to/one")])); |
| 222 }); | 222 }); |
| 223 }); | 223 }); |
| 224 | 224 |
| 225 group("clear", () { | 225 group("clear", () { |
| 226 test("removes all paths from the set", () { | 226 test("removes all paths from the set", () { |
| 227 set.add("root/path"); | 227 set.add("root/path"); |
| 228 set.add("root/path/to/one"); | 228 set.add("root/path/to/one"); |
| 229 set.add("root/path/to/two"); | 229 set.add("root/path/to/two"); |
| 230 | 230 |
| 231 set.clear(); | 231 set.clear(); |
| 232 expect(set.toSet(), isEmpty); | 232 expect(set.toSet(), isEmpty); |
| 233 }); | 233 }); |
| 234 }); | 234 }); |
| 235 } | 235 } |
| OLD | NEW |