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

Side by Side Diff: tests/corelib/linked_hash_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, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/co19/co19-co19.status ('k') | tests/corelib/map_from_iterable_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import 'dart:collection'; 6 import 'dart:collection';
7 7
8 main() { 8 main() {
9 defaultFunctionValuesTest(); 9 defaultFunctionValuesTest();
10 defaultKeyFunctionTest(); 10 defaultKeyFunctionTest();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 Expect.equals(2, map.length); 95 Expect.equals(2, map.length);
96 Expect.equals(2, map.keys.length); 96 Expect.equals(2, map.keys.length);
97 Expect.equals(2, map.values.length); 97 Expect.equals(2, map.values.length);
98 98
99 Expect.equals(1, map[2]); 99 Expect.equals(1, map[2]);
100 Expect.equals(2, map[3]); 100 Expect.equals(2, map[3]);
101 } 101 }
102 102
103 void genericTypeTest() { 103 void genericTypeTest() {
104 var map = new LinkedHashMap<int, String>.fromIterable([1, 2, 3], value: (x) => '$x'); 104 var map = new LinkedHashMap<int, String>.fromIterable(
105 <int>[1, 2, 3], value: (x) => '$x');
105 Expect.isTrue(map is Map<int, String>); 106 Expect.isTrue(map is Map<int, String>);
106 Expect.isTrue(map is LinkedHashMap<int, String>); 107 Expect.isTrue(map is LinkedHashMap<int, String>);
107 108
109 map = new LinkedHashMap<String, String>.fromIterable(
110 <int>[1, 2, 3], key: (x) => '$x', value: (x) => '$x');
111 Expect.isTrue(map is Map<String, String>);
112 Expect.isTrue(map is LinkedHashMap<String, String>);
113
108 // Make sure it is not just LinkedHashMap<dynamic, dynamic>. 114 // Make sure it is not just LinkedHashMap<dynamic, dynamic>.
109 Expect.isFalse(map is LinkedHashMap<String, dynamic>); 115 Expect.isFalse(map is LinkedHashMap<int, dynamic>);
110 Expect.isFalse(map is LinkedHashMap<dynamic, int>); 116 Expect.isFalse(map is LinkedHashMap<dynamic, int>);
111 } 117 }
112
OLDNEW
« no previous file with comments | « tests/co19/co19-co19.status ('k') | tests/corelib/map_from_iterable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698