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

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

Issue 94013005: Fix typo in failure-branch of stream iterator test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « pkg/async/pubspec.yaml ('k') | no next file » | 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:unittest/unittest.dart"; 6 import "package:unittest/unittest.dart";
7 7
8 main() { 8 main() {
9 test("stream iterator basic", () { 9 test("stream iterator basic", () {
10 StreamController c = new StreamController(); 10 StreamController c = new StreamController();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 test("stream iterator error", () { 49 test("stream iterator error", () {
50 StreamController c = new StreamController(); 50 StreamController c = new StreamController();
51 Stream s = c.stream; 51 Stream s = c.stream;
52 StreamIterator i = new StreamIterator(s); 52 StreamIterator i = new StreamIterator(s);
53 i.moveNext().then(expectAsync1((bool b) { 53 i.moveNext().then(expectAsync1((bool b) {
54 expect(b, isTrue); 54 expect(b, isTrue);
55 expect(42, i.current); 55 expect(42, i.current);
56 return i.moveNext(); 56 return i.moveNext();
57 })).then((bool b) { 57 })).then((bool b) {
58 Expect.fail("Result not expected"); 58 fail("Result not expected");
59 }, onError: expectAsync1((e) { 59 }, onError: expectAsync1((e) {
60 expect("BAD", e); 60 expect("BAD", e);
61 return i.moveNext(); 61 return i.moveNext();
62 })).then(expectAsync1((bool b) { 62 })).then(expectAsync1((bool b) {
63 expect(b, isFalse); 63 expect(b, isFalse);
64 })); 64 }));
65 c.add(42); 65 c.add(42);
66 c.addError("BAD"); 66 c.addError("BAD");
67 c.add(37); 67 c.add(37);
68 c.close(); 68 c.close();
(...skipping 16 matching lines...) Expand all
85 })).then(expectAsync1((bool b) { 85 })).then(expectAsync1((bool b) {
86 expect(b, isTrue); 86 expect(b, isTrue);
87 expect(37, i.current); 87 expect(37, i.current);
88 return i.moveNext(); 88 return i.moveNext();
89 })).then(expectAsync1((bool b) { 89 })).then(expectAsync1((bool b) {
90 expect(b, isFalse); 90 expect(b, isFalse);
91 })); 91 }));
92 c.add(42); 92 c.add(42);
93 }); 93 });
94 } 94 }
OLDNEW
« no previous file with comments | « pkg/async/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698