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

Unified Diff: tests/corelib/map_from_iterable_test.dart

Issue 23486007: Change the field and constructor parameter types of NoSuchMethodError to Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 7 years, 4 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
Index: tests/corelib/map_from_iterable_test.dart
diff --git a/tests/corelib/map_from_iterable_test.dart b/tests/corelib/map_from_iterable_test.dart
index c5aa0c0faae72eea5f8fca19cd18b87bc53f4720..ed86cde8eb1b7ce8fd9480bab739c8e6a496ff26 100644
--- a/tests/corelib/map_from_iterable_test.dart
+++ b/tests/corelib/map_from_iterable_test.dart
@@ -16,10 +16,10 @@ main() {
}
void defaultFunctionValuesTest() {
- var map = new Map.fromIterable([1, 2, 3]);
+ var map = new HashMap.fromIterable([1, 2, 3]);
Expect.isTrue(map is Map);
- Expect.isTrue(map is LinkedHashMap);
+ Expect.isTrue(map is HashMap);
Expect.equals(3, map.length);
Expect.equals(3, map.keys.length);
@@ -31,10 +31,10 @@ void defaultFunctionValuesTest() {
}
void defaultKeyFunctionTest() {
- var map = new Map.fromIterable([1, 2, 3], value: (x) => x + 1);
+ var map = new HashMap.fromIterable([1, 2, 3], value: (x) => x + 1);
Expect.isTrue(map is Map);
- Expect.isTrue(map is LinkedHashMap);
+ Expect.isTrue(map is HashMap);
Expect.equals(3, map.length);
Expect.equals(3, map.keys.length);
@@ -46,10 +46,10 @@ void defaultKeyFunctionTest() {
}
void defaultValueFunctionTest() {
- var map = new Map.fromIterable([1, 2, 3], key: (x) => x + 1);
+ var map = new HashMap.fromIterable([1, 2, 3], key: (x) => x + 1);
Expect.isTrue(map is Map);
- Expect.isTrue(map is LinkedHashMap);
+ Expect.isTrue(map is HashMap);
Expect.equals(3, map.length);
Expect.equals(3, map.keys.length);
@@ -61,11 +61,11 @@ void defaultValueFunctionTest() {
}
void noDefaultValuesTest() {
- var map = new Map.fromIterable([1, 2, 3],
+ var map = new HashMap.fromIterable([1, 2, 3],
key: (x) => x + 1, value: (x) => x - 1);
Expect.isTrue(map is Map);
- Expect.isTrue(map is LinkedHashMap);
+ Expect.isTrue(map is HashMap);
Expect.equals(3, map.length);
Expect.equals(3, map.keys.length);
@@ -77,9 +77,9 @@ void noDefaultValuesTest() {
}
void emptyIterableTest() {
- var map = new Map.fromIterable([]);
+ var map = new HashMap.fromIterable([]);
Expect.isTrue(map is Map);
- Expect.isTrue(map is LinkedHashMap);
+ Expect.isTrue(map is HashMap);
Expect.equals(0, map.length);
Expect.equals(0, map.keys.length);
@@ -87,10 +87,10 @@ void emptyIterableTest() {
}
void equalElementsTest() {
- var map = new Map.fromIterable([1, 2, 2], key: (x) => x + 1);
+ var map = new HashMap.fromIterable([1, 2, 2], key: (x) => x + 1);
Expect.isTrue(map is Map);
- Expect.isTrue(map is LinkedHashMap);
+ Expect.isTrue(map is HashMap);
Expect.equals(2, map.length);
Expect.equals(2, map.keys.length);
@@ -101,11 +101,12 @@ void equalElementsTest() {
}
void genericTypeTest() {
- var map = new Map<int, String>.fromIterable([1, 2, 3], value: (x) => '$x');
- Expect.isTrue(map is Map<int, String>);
+ var map = new HashMap<String, String>.fromIterable(
+ <int>[1, 2, 3], key: (x) => '$x', value: (x) => '$x');
+ Expect.isTrue(map is Map<String, String>);
// Make sure it is not just Map<dynamic, dynamic>.
- Expect.isFalse(map is Map<String, dynamic>);
+ Expect.isFalse(map is Map<int, dynamic>);
Expect.isFalse(map is Map<dynamic, int>);
}
« no previous file with comments | « tests/corelib/linked_hash_map_from_iterable_test.dart ('k') | tests/language/call_nonexistent_static_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698