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

Unified Diff: tests/language/map_test.dart

Issue 11664006: Make Map.keys/values Iterables. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Add TODO that map.keys should return a Set. Created 7 years, 12 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/language/compile_time_constant_b_test.dart ('k') | tests/language/ordered_maps_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/map_test.dart
diff --git a/tests/language/map_test.dart b/tests/language/map_test.dart
index 3968cf8a0efde68a371bf8ff4d9fb1174029b841..a055f7696521cd29a14e0664a852e19048ac0713 100644
--- a/tests/language/map_test.dart
+++ b/tests/language/map_test.dart
@@ -158,7 +158,7 @@ class MapTest {
void testForEachCollection(value) {
other_map[value] = value;
}
- Collection keys = map.keys;
+ Iterable keys = map.keys;
keys.forEach(testForEachCollection);
Expect.equals(true, other_map.containsKey(key1));
Expect.equals(true, other_map.containsKey(key2));
@@ -173,7 +173,7 @@ class MapTest {
Expect.equals(0, other_map.length);
// Test Collection.values.
- Collection values = map.values;
+ Iterable values = map.values;
values.forEach(testForEachCollection);
Expect.equals(true, !other_map.containsKey(key1));
Expect.equals(true, !other_map.containsKey(key2));
@@ -200,9 +200,9 @@ class MapTest {
static testKeys(Map map) {
map[1] = 101;
map[2] = 102;
- Collection k = map.keys;
+ Iterable k = map.keys;
Expect.equals(2, k.length);
- Collection v = map.values;
+ Iterable v = map.values;
Expect.equals(2, v.length);
Expect.equals(true, map.containsValue(101));
Expect.equals(true, map.containsValue(102));
« no previous file with comments | « tests/language/compile_time_constant_b_test.dart ('k') | tests/language/ordered_maps_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698