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

Unified Diff: tests/corelib/list_test.dart

Issue 331833003: Revert "Add "last" setter to List." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « tests/co19/co19-co19.status ('k') | third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/list_test.dart
diff --git a/tests/corelib/list_test.dart b/tests/corelib/list_test.dart
index e8756a2e2c9b6846c82b90d722d2e4cb64015cf4..5187ee84ccce4cb210548b52923e1db406914798 100644
--- a/tests/corelib/list_test.dart
+++ b/tests/corelib/list_test.dart
@@ -45,12 +45,6 @@ void main() {
testTypedGrowableList(new Uint32List(0).toList());
testTypedGrowableList(new Int32List(0).toList());
- // Lists based on ListBase and ListMixin.
- testGrowableList(new BaseList());
- testGrowableList(new BaseList().toList());
- testGrowableList(new MixinList());
- testGrowableList(new MixinList().toList());
-
testListConstructor();
}
@@ -76,23 +70,6 @@ void testTypedLengthInvariantOperations(List list) {
list[i] = i;
}
- // last=
- Expect.listEquals([0, 1, 2, 3], list);
- list.last = 47;
- Expect.listEquals([0, 1, 2, 47], list);
- list.last -= 5;
- Expect.listEquals([0, 1, 2, 42], list);
- list.last++;
- Expect.listEquals([0, 1, 2, 43], list);
- ++list.last;
- Expect.listEquals([0, 1, 2, 44], list);
- list.last--;
- Expect.listEquals([0, 1, 2, 43], list);
- --list.last;
- Expect.listEquals([0, 1, 2, 42], list);
- list.last = 3;
- Expect.listEquals([0, 1, 2, 3], list);
-
// indexOf, lastIndexOf
for (int i = 0; i < 4; i++) {
Expect.equals(i, list[i]);
@@ -527,15 +504,3 @@ void testListConstructor() {
Expect.throws(() { new List.filled(-2, 42); }); // Not negative.
Expect.throws(() { new List.filled(null, 42); }); // Not null.
}
-
-abstract class ListImpl<E>{
- List _base = [];
- int get length => _base.length;
- void set length(int length) { _base.length = length; }
- E operator[](int index) => _base[index];
- void operator[]=(int index, E value) { _base[index] = value; }
-}
-
-class BaseList<E> = ListBase<E> with ListImpl<E>;
-
-class MixinList<E> = ListImpl<E> with ListMixin<E>;
« no previous file with comments | « tests/co19/co19-co19.status ('k') | third_party/pkg/js/lib/src/wrapping/js/array_to_list_adapter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698