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

Side by Side Diff: tests/language/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/language/map_literal_test.dart ('k') | tests/language/math_vm_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 // A subtest of the larger MapTest. Will eliminate once the full 4 // A subtest of the larger MapTest. Will eliminate once the full
5 // test is running. 5 // test is running.
6 6
7 import "package:expect/expect.dart";
8
9 class MapTest { 7 class MapTest {
10 8
11 static void testDeletedElement(Map map) { 9 static void testDeletedElement(Map map) {
12 map.clear(); 10 map.clear();
13 for (int i = 0; i < 100; i++) { 11 for (int i = 0; i < 100; i++) {
14 map[1] = 2; 12 map[1] = 2;
15 Expect.equals(1, map.length); 13 Expect.equals(1, map.length);
16 int x = map.remove(1); 14 int x = map.remove(1);
17 Expect.equals(2, x); 15 Expect.equals(2, x);
18 Expect.equals(0, map.length); 16 Expect.equals(0, map.length);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 static testMain() { 212 static testMain() {
215 test(new Map()); 213 test(new Map());
216 testKeys(new Map()); 214 testKeys(new Map());
217 } 215 }
218 } 216 }
219 217
220 218
221 main() { 219 main() {
222 MapTest.testMain(); 220 MapTest.testMain();
223 } 221 }
OLDNEW
« no previous file with comments | « tests/language/map_literal_test.dart ('k') | tests/language/math_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698