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

Side by Side Diff: tests/lib/async/stream_iterator_test.dart

Issue 2656503004: Revert "Remove package:unittest from some tests" (Closed)
Patch Set: Created 3 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
« no previous file with comments | « tests/lib/async/stream_from_iterable_test.dart ('k') | tests/lib/async/stream_join_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "dart:async"; 5 import "dart:async";
6 import "package:test/test.dart"; 6 import "package:unittest/unittest.dart";
7 7
8 main() { 8 main() {
9 test("stream iterator basic", () async { 9 test("stream iterator basic", () async {
10 var stream = createStream(); 10 var stream = createStream();
11 StreamIterator iterator = new StreamIterator(stream); 11 StreamIterator iterator = new StreamIterator(stream);
12 expect(iterator.current, isNull); 12 expect(iterator.current, isNull);
13 expect(await iterator.moveNext(), isTrue); 13 expect(await iterator.moveNext(), isTrue);
14 expect(iterator.current, 42); 14 expect(iterator.current, 42);
15 expect(await iterator.moveNext(), isTrue); 15 expect(await iterator.moveNext(), isTrue);
16 expect(iterator.current, 37); 16 expect(iterator.current, 37);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 /// Create a stream that throws when cancelled. 87 /// Create a stream that throws when cancelled.
88 Stream createCancelErrorStream() async* { 88 Stream createCancelErrorStream() async* {
89 int i = 0; 89 int i = 0;
90 try { 90 try {
91 while (true) yield i++; 91 while (true) yield i++;
92 } finally { 92 } finally {
93 throw "BAD"; 93 throw "BAD";
94 } 94 }
95 } 95 }
OLDNEW
« no previous file with comments | « tests/lib/async/stream_from_iterable_test.dart ('k') | tests/lib/async/stream_join_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698