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

Side by Side Diff: tests/corelib/list_growable_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/list_get_range_test.dart ('k') | tests/corelib/list_index_of_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 main() { 7 main() {
6 var a; 8 var a;
7 a = new List(); 9 a = new List();
8 a.add(499); 10 a.add(499);
9 Expect.equals(1, a.length); 11 Expect.equals(1, a.length);
10 Expect.equals(499, a[0]); 12 Expect.equals(499, a[0]);
11 a.clear(); 13 a.clear();
12 Expect.equals(0, a.length); 14 Expect.equals(0, a.length);
13 Expect.throws(() => a[0], (e) => e is RangeError); 15 Expect.throws(() => a[0], (e) => e is RangeError);
14 16
(...skipping 12 matching lines...) Expand all
27 a.add(499); 29 a.add(499);
28 Expect.equals(43, a.length); 30 Expect.equals(43, a.length);
29 Expect.equals(499, a[42]); 31 Expect.equals(499, a[42]);
30 for (int i = 0; i < 42; i++) { 32 for (int i = 0; i < 42; i++) {
31 Expect.equals(null, a[i]); 33 Expect.equals(null, a[i]);
32 } 34 }
33 a.clear(); 35 a.clear();
34 Expect.equals(0, a.length); 36 Expect.equals(0, a.length);
35 Expect.throws(() => a[0], (e) => e is RangeError); 37 Expect.throws(() => a[0], (e) => e is RangeError);
36 } 38 }
OLDNEW
« no previous file with comments | « tests/corelib/list_get_range_test.dart ('k') | tests/corelib/list_index_of_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698