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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
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
5 class ListIteratorsTest { 7 class ListIteratorsTest {
6 static void checkListIterator(List a) { 8 static void checkListIterator(List a) {
7 Iterator it = a.iterator; 9 Iterator it = a.iterator;
8 Expect.isNull(it.current); 10 Expect.isNull(it.current);
9 for (int i = 0; i < a.length; i++) { 11 for (int i = 0; i < a.length; i++) {
10 Expect.isTrue(it.moveNext()); 12 Expect.isTrue(it.moveNext());
11 var elem = it.current; 13 var elem = it.current;
12 Expect.equals(a[i], elem); 14 Expect.equals(a[i], elem);
13 } 15 }
14 Expect.isFalse(it.moveNext()); 16 Expect.isFalse(it.moveNext());
(...skipping 24 matching lines...) Expand all
39 Expect.equals(3, it.current); 41 Expect.equals(3, it.current);
40 Expect.throws(it.moveNext, (e) => e is ConcurrentModificationError); 42 Expect.throws(it.moveNext, (e) => e is ConcurrentModificationError);
41 // No progress when throwing. 43 // No progress when throwing.
42 Expect.equals(3, it.current); 44 Expect.equals(3, it.current);
43 } 45 }
44 } 46 }
45 47
46 main() { 48 main() {
47 ListIteratorsTest.testMain(); 49 ListIteratorsTest.testMain();
48 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698