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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
5 void testListMapCorrespondence(List list, Map map) { 7 void testListMapCorrespondence(List list, Map map) {
6 Expect.equals(list.length, map.length); 8 Expect.equals(list.length, map.length);
7 for (int i = 0; i < list.length; i++) { 9 for (int i = 0; i < list.length; i++) {
8 Expect.equals(list[i], map[i]); 10 Expect.equals(list[i], map[i]);
9 } 11 }
10 Expect.isNull(map[list.length]); 12 Expect.isNull(map[list.length]);
11 Expect.isNull(map[-1]); 13 Expect.isNull(map[-1]);
12 14
13 Iterable keys = map.keys; 15 Iterable keys = map.keys;
14 Iterable values = map.values; 16 Iterable values = map.values;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 testConstAsMap(const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 89 testConstAsMap(const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
88 testAsMap([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); 90 testAsMap([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
89 List list = new List(10); 91 List list = new List(10);
90 for (int i = 0; i < 10; i++) list[i] = i + 1; 92 for (int i = 0; i < 10; i++) list[i] = i + 1;
91 testFixedAsMap(list); 93 testFixedAsMap(list);
92 94
93 testConstAsMap(const []); 95 testConstAsMap(const []);
94 testAsMap([]); 96 testAsMap([]);
95 testFixedAsMap(new List(0)); 97 testFixedAsMap(new List(0));
96 } 98 }
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