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

Side by Side Diff: tests/corelib/list_as_map_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/corelib/linked_hash_map_test.dart ('k') | tests/corelib/list_first_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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";
6
7 void testListMapCorrespondence(List list, Map map) { 5 void testListMapCorrespondence(List list, Map map) {
8 Expect.equals(list.length, map.length); 6 Expect.equals(list.length, map.length);
9 for (int i = 0; i < list.length; i++) { 7 for (int i = 0; i < list.length; i++) {
10 Expect.equals(list[i], map[i]); 8 Expect.equals(list[i], map[i]);
11 } 9 }
12 Expect.isNull(map[list.length]); 10 Expect.isNull(map[list.length]);
13 Expect.isNull(map[-1]); 11 Expect.isNull(map[-1]);
14 12
15 Iterable keys = map.keys; 13 Iterable keys = map.keys;
16 Iterable values = map.values; 14 Iterable values = map.values;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 testConstAsMap(const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 87 testConstAsMap(const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
90 testAsMap([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 88 testAsMap([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
91 List list = new List(10); 89 List list = new List(10);
92 for (int i = 0; i < 10; i++) list[i] = i + 1; 90 for (int i = 0; i < 10; i++) list[i] = i + 1;
93 testFixedAsMap(list); 91 testFixedAsMap(list);
94 92
95 testConstAsMap(const []); 93 testConstAsMap(const []);
96 testAsMap([]); 94 testAsMap([]);
97 testFixedAsMap(new List(0)); 95 testFixedAsMap(new List(0));
98 } 96 }
OLDNEW
« no previous file with comments | « tests/corelib/linked_hash_map_test.dart ('k') | tests/corelib/list_first_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698