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

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

Issue 11867024: Move some core classes to collection library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status files with bug number. Created 7 years, 11 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/collection_to_string_test.dart ('k') | tests/corelib/linked_hash_map_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 library hasNextIterator.test;
6 import 'dart:collection';
7
5 main() { 8 main() {
6 var it = new HasNextIterator([].iterator); 9 var it = new HasNextIterator([].iterator);
7 Expect.isFalse(it.hasNext); 10 Expect.isFalse(it.hasNext);
8 Expect.isFalse(it.hasNext); 11 Expect.isFalse(it.hasNext);
9 Expect.throws(() => it.next(), (e) => e is StateError); 12 Expect.throws(() => it.next(), (e) => e is StateError);
10 Expect.isFalse(it.hasNext); 13 Expect.isFalse(it.hasNext);
11 14
12 it = new HasNextIterator([1].iterator); 15 it = new HasNextIterator([1].iterator);
13 Expect.isTrue(it.hasNext); 16 Expect.isTrue(it.hasNext);
14 Expect.isTrue(it.hasNext); 17 Expect.isTrue(it.hasNext);
15 Expect.equals(1, it.next()); 18 Expect.equals(1, it.next());
16 Expect.isFalse(it.hasNext); 19 Expect.isFalse(it.hasNext);
17 Expect.isFalse(it.hasNext); 20 Expect.isFalse(it.hasNext);
18 Expect.throws(() => it.next(), (e) => e is StateError); 21 Expect.throws(() => it.next(), (e) => e is StateError);
19 Expect.isFalse(it.hasNext); 22 Expect.isFalse(it.hasNext);
20 23
21 it = new HasNextIterator([1, 2].iterator); 24 it = new HasNextIterator([1, 2].iterator);
22 Expect.isTrue(it.hasNext); 25 Expect.isTrue(it.hasNext);
23 Expect.isTrue(it.hasNext); 26 Expect.isTrue(it.hasNext);
24 Expect.equals(1, it.next()); 27 Expect.equals(1, it.next());
25 Expect.isTrue(it.hasNext); 28 Expect.isTrue(it.hasNext);
26 Expect.isTrue(it.hasNext); 29 Expect.isTrue(it.hasNext);
27 Expect.equals(2, it.next()); 30 Expect.equals(2, it.next());
28 Expect.isFalse(it.hasNext); 31 Expect.isFalse(it.hasNext);
29 Expect.isFalse(it.hasNext); 32 Expect.isFalse(it.hasNext);
30 Expect.throws(() => it.next(), (e) => e is StateError); 33 Expect.throws(() => it.next(), (e) => e is StateError);
31 Expect.isFalse(it.hasNext); 34 Expect.isFalse(it.hasNext);
32 } 35 }
OLDNEW
« no previous file with comments | « tests/corelib/collection_to_string_test.dart ('k') | tests/corelib/linked_hash_map_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698