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

Side by Side Diff: test/typed_wrapper/stream_test.dart

Issue 2161283002: Fix Dart 1.17 strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/async.git@master
Patch Set: Created 4 years, 5 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 | « test/typed_wrapper/stream_subscription_test.dart ('k') | test/utils.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 6
7 import "package:async/async.dart";
8 import "package:async/src/typed/stream.dart"; 7 import "package:async/src/typed/stream.dart";
9 import "package:test/test.dart"; 8 import "package:test/test.dart";
10 9
11 import '../utils.dart'; 10 import '../utils.dart';
12 11
13 void main() { 12 void main() {
14 group("with valid types, forwards", () { 13 group("with valid types, forwards", () {
15 var controller; 14 var controller;
16 var wrapper; 15 var wrapper;
17 var emptyWrapper; 16 var emptyWrapper;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 expect(wrapper.listen(null).asFuture(), completes); 237 expect(wrapper.listen(null).asFuture(), completes);
239 }); 238 });
240 }); 239 });
241 240
242 test("map()", () { 241 test("map()", () {
243 expect(wrapper.map((i) => i * 2).toList(), 242 expect(wrapper.map((i) => i * 2).toList(),
244 completion(equals([2, 4, 6, 8, 10]))); 243 completion(equals([2, 4, 6, 8, 10])));
245 }); 244 });
246 245
247 test("pipe()", () { 246 test("pipe()", () {
248 var consumer = new StreamController<T>(); 247 var consumer = new StreamController();
249 expect(wrapper.pipe(consumer), completes); 248 expect(wrapper.pipe(consumer), completes);
250 expect(consumer.stream.toList(), completion(equals([1, 2, 3, 4, 5]))); 249 expect(consumer.stream.toList(), completion(equals([1, 2, 3, 4, 5])));
251 }); 250 });
252 251
253 test("reduce()", () { 252 test("reduce()", () {
254 expect(wrapper.reduce((value, i) => value + i), completion(equals(15))); 253 expect(wrapper.reduce((value, i) => value + i), completion(equals(15)));
255 expect(emptyWrapper.reduce((value, i) => value + i), throwsStateError); 254 expect(emptyWrapper.reduce((value, i) => value + i), throwsStateError);
256 }); 255 });
257 256
258 test("skipWhile()", () { 257 test("skipWhile()", () {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 expect(wrapper.join(" "), completion(equals("foo bar baz"))); 588 expect(wrapper.join(" "), completion(equals("foo bar baz")));
590 }); 589 });
591 }); 590 });
592 591
593 test("toString()", () { 592 test("toString()", () {
594 expect(wrapper.toString(), contains("Stream")); 593 expect(wrapper.toString(), contains("Stream"));
595 }); 594 });
596 }); 595 });
597 }); 596 });
598 } 597 }
OLDNEW
« no previous file with comments | « test/typed_wrapper/stream_subscription_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698