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

Unified Diff: tests/corelib/map_test.dart

Issue 212673004: Remove use of now private class from map_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/map_test.dart
diff --git a/tests/corelib/map_test.dart b/tests/corelib/map_test.dart
index 5d2d055d3ce9e0a9068e48d999b2cdca12d00959..a432b48127159cefd05c970c159cbb2d2d8fbc23 100644
--- a/tests/corelib/map_test.dart
+++ b/tests/corelib/map_test.dart
@@ -97,9 +97,9 @@ void main() {
isValidKey: (v) => v is int));
testOtherKeys(new MapBaseMap<int, int>());
+ testUnmodifiableMap(const {1 : 37});
testUnmodifiableMap(new UnmodifiableMapView({1 : 37}));
testUnmodifiableMap(new UnmodifiableMapBaseMap([1, 37]));
- testUnmodifiableMap(new MapBaseUnmodifiableMap([1, 37]));
}
@@ -872,28 +872,3 @@ class UnmodifiableMapBaseMap<K, V> extends UnmodifiableMapBase<K, V> {
Iterable<K> get keys => _keys.skip(0);
}
-
-// Slow implementation of unmodifiable Map based on MapBase and
-// UnmodifiableMapMixin.
-class MapBaseUnmodifiableMap<K, V> extends MapBase<K, V>
- with UnmodifiableMapMixin<K, V> {
- final List _keys = <K>[];
- final List _values = <V>[];
-
- int get _modCount => 0;
-
- MapBaseUnmodifiableMap(List pairs) {
- for (int i = 0; i < pairs.length; i += 2) {
- _keys.add(pairs[i]);
- _values.add(pairs[i + 1]);
- }
- }
-
- V operator[](Object key) {
- int index = _keys.indexOf(key);
- if (index < 0) return null;
- return _values[index];
- }
-
- Iterable<K> get keys => new TestKeyIterable<K>(this);
-}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698