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

Unified Diff: dart/tests/compiler/dart2js/link_test.dart

Issue 744023002: Add Link.copyWithout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « dart/pkg/compiler/lib/src/util/link_implementation.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js/link_test.dart
diff --git a/dart/tests/compiler/dart2js/link_test.dart b/dart/tests/compiler/dart2js/link_test.dart
index a2c21222e6264851e0d70b9ff0f619a4c5ad25bb..5ee61e4ba0068a091b6f6c4ed06682a3e50f78fe 100644
--- a/dart/tests/compiler/dart2js/link_test.dart
+++ b/dart/tests/compiler/dart2js/link_test.dart
@@ -21,6 +21,8 @@ main() {
testFromList([0, 1, 2, 3, 4]);
testFromList([0, 1, 2, 3, 4, 5]);
testSkip();
+
+ testCopyWithout();
}
testFromList(List list) {
@@ -61,3 +63,14 @@ testSkip() {
Expect.isTrue(emptyLink.skip(0).isEmpty);
Expect.throws(() => emptyLink.skip(1), (e) => e is RangeError);
}
+
+testCopyWithout() {
+ test(const Link().copyWithout(0), []);
+
+ test(LinkFromList([0]).copyWithout(0), []);
+ test(LinkFromList([0, 1]).copyWithout(0), [1]);
+ test(LinkFromList([0, 1, 2]).copyWithout(0), [1, 2]);
+ test(LinkFromList([0, 1, 2]).copyWithout(1), [0, 2]);
+ test(LinkFromList([0, 1, 2]).copyWithout(2), [0, 1]);
+ test(LinkFromList([0, 1, 2]).copyWithout(3), [0, 1, 2]);
+}
« no previous file with comments | « dart/pkg/compiler/lib/src/util/link_implementation.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698