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

Side by Side Diff: tests/corelib/has_next_iterator_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) 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 library hasNextIterator.test; 5 library hasNextIterator.test;
6 import "package:expect/expect.dart";
6 import 'dart:collection'; 7 import 'dart:collection';
7 8
8 main() { 9 main() {
9 var it = new HasNextIterator([].iterator); 10 var it = new HasNextIterator([].iterator);
10 Expect.isFalse(it.hasNext); 11 Expect.isFalse(it.hasNext);
11 Expect.isFalse(it.hasNext); 12 Expect.isFalse(it.hasNext);
12 Expect.throws(() => it.next(), (e) => e is StateError); 13 Expect.throws(() => it.next(), (e) => e is StateError);
13 Expect.isFalse(it.hasNext); 14 Expect.isFalse(it.hasNext);
14 15
15 it = new HasNextIterator([1].iterator); 16 it = new HasNextIterator([1].iterator);
(...skipping 10 matching lines...) Expand all
26 Expect.isTrue(it.hasNext); 27 Expect.isTrue(it.hasNext);
27 Expect.equals(1, it.next()); 28 Expect.equals(1, it.next());
28 Expect.isTrue(it.hasNext); 29 Expect.isTrue(it.hasNext);
29 Expect.isTrue(it.hasNext); 30 Expect.isTrue(it.hasNext);
30 Expect.equals(2, it.next()); 31 Expect.equals(2, it.next());
31 Expect.isFalse(it.hasNext); 32 Expect.isFalse(it.hasNext);
32 Expect.isFalse(it.hasNext); 33 Expect.isFalse(it.hasNext);
33 Expect.throws(() => it.next(), (e) => e is StateError); 34 Expect.throws(() => it.next(), (e) => e is StateError);
34 Expect.isFalse(it.hasNext); 35 Expect.isFalse(it.hasNext);
35 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698