| Index: tests/corelib/collection_removes_test.dart
|
| diff --git a/tests/corelib/collection_removes_test.dart b/tests/corelib/collection_removes_test.dart
|
| index c22ad21848b4a18560f0555b6c6f79a7c8c3d314..ade1509c02e6d2bc6f1e7a2cf79c9ca5a9a4abaa 100644
|
| --- a/tests/corelib/collection_removes_test.dart
|
| +++ b/tests/corelib/collection_removes_test.dart
|
| @@ -2,6 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +import "dart:collection";
|
| import "package:expect/expect.dart";
|
|
|
| testRemove(Collection base) {
|
| @@ -106,7 +107,25 @@ void main() {
|
| testRetainAll(base.toSet(), deltaSet);
|
| testRemoveWhere(base.toSet(), deltaSet.contains);
|
| testRetainWhere(base.toSet(), (e) => !deltaSet.contains(e));
|
| +
|
| + // Test the ListBase class's List implementation.
|
| + testRemoveAll(new MyList(base.toList()), delta);
|
| + testRemoveAll(new MyList(base.toList()), deltaSet);
|
| + testRetainAll(new MyList(base.toList()), delta);
|
| + testRetainAll(new MyList(base.toList()), deltaSet);
|
| + testRemoveWhere(new MyList(base.toList()), deltaSet.contains);
|
| + testRetainWhere(new MyList(base.toList()),
|
| + (e) => !deltaSet.contains(e));
|
| +
|
| }
|
| }
|
| }
|
|
|
| +class MyList<E> extends ListBase<E> {
|
| + List<E> _source;
|
| + MyList(this._source);
|
| + int get length => _source.length;
|
| + void set length(int length) { _source.length = length; }
|
| + E operator[](int index) => _source[index];
|
| + void operator[]=(int index, E value) { _source[index] = value; }
|
| +}
|
|
|