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

Side by Side Diff: tests/language/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/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
7 class MapTest { 9 class MapTest {
8 10
9 static void testDeletedElement(Map map) { 11 static void testDeletedElement(Map map) {
10 map.clear(); 12 map.clear();
11 for (int i = 0; i < 100; i++) { 13 for (int i = 0; i < 100; i++) {
12 map[1] = 2; 14 map[1] = 2;
13 Expect.equals(1, map.length); 15 Expect.equals(1, map.length);
14 int x = map.remove(1); 16 int x = map.remove(1);
15 Expect.equals(2, x); 17 Expect.equals(2, x);
16 Expect.equals(0, map.length); 18 Expect.equals(0, map.length);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 static testMain() { 214 static testMain() {
213 test(new Map()); 215 test(new Map());
214 testKeys(new Map()); 216 testKeys(new Map());
215 } 217 }
216 } 218 }
217 219
218 220
219 main() { 221 main() {
220 MapTest.testMain(); 222 MapTest.testMain();
221 } 223 }
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