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

Side by Side Diff: tests/corelib/list_iterators_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/list_insert_range_test.dart ('k') | tests/corelib/list_last_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 4
5 import "package:expect/expect.dart";
6
7 class ListIteratorsTest { 5 class ListIteratorsTest {
8 static void checkListIterator(List a) { 6 static void checkListIterator(List a) {
9 Iterator it = a.iterator; 7 Iterator it = a.iterator;
10 Expect.isNull(it.current); 8 Expect.isNull(it.current);
11 for (int i = 0; i < a.length; i++) { 9 for (int i = 0; i < a.length; i++) {
12 Expect.isTrue(it.moveNext()); 10 Expect.isTrue(it.moveNext());
13 var elem = it.current; 11 var elem = it.current;
14 Expect.equals(a[i], elem); 12 Expect.equals(a[i], elem);
15 } 13 }
16 Expect.isFalse(it.moveNext()); 14 Expect.isFalse(it.moveNext());
(...skipping 24 matching lines...) Expand all
41 Expect.equals(3, it.current); 39 Expect.equals(3, it.current);
42 Expect.throws(it.moveNext, (e) => e is ConcurrentModificationError); 40 Expect.throws(it.moveNext, (e) => e is ConcurrentModificationError);
43 // No progress when throwing. 41 // No progress when throwing.
44 Expect.equals(3, it.current); 42 Expect.equals(3, it.current);
45 } 43 }
46 } 44 }
47 45
48 main() { 46 main() {
49 ListIteratorsTest.testMain(); 47 ListIteratorsTest.testMain();
50 } 48 }
OLDNEW
« no previous file with comments | « tests/corelib/list_insert_range_test.dart ('k') | tests/corelib/list_last_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698