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

Side by Side Diff: test/stream_splitter_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/stream_queue_test.dart ('k') | test/stream_zip_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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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'; 7 import 'package:async/async.dart';
8 import 'package:test/test.dart'; 8 import 'package:test/test.dart';
9 9
10 main() { 10 main() {
11 var controller; 11 StreamController<int> controller;
12 var splitter; 12 var splitter;
13 setUp(() { 13 setUp(() {
14 controller = new StreamController<int>(); 14 controller = new StreamController<int>();
15 splitter = new StreamSplitter<int>(controller.stream); 15 splitter = new StreamSplitter<int>(controller.stream);
16 }); 16 });
17 17
18 test("a branch that's created before the stream starts to replay it", 18 test("a branch that's created before the stream starts to replay it",
19 () async { 19 () async {
20 var events = []; 20 var events = [];
21 var branch = splitter.split(); 21 var branch = splitter.split();
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 expect(branches[0].toList(), completion(equals([1, 2, 3]))); 277 expect(branches[0].toList(), completion(equals([1, 2, 3])));
278 expect(branches[1].toList(), completion(equals([1, 2, 3]))); 278 expect(branches[1].toList(), completion(equals([1, 2, 3])));
279 expect(branches[2].toList(), completion(equals([1, 2, 3]))); 279 expect(branches[2].toList(), completion(equals([1, 2, 3])));
280 expect(branches[3].toList(), completion(equals([1, 2, 3]))); 280 expect(branches[3].toList(), completion(equals([1, 2, 3])));
281 expect(branches[4].toList(), completion(equals([1, 2, 3]))); 281 expect(branches[4].toList(), completion(equals([1, 2, 3])));
282 }); 282 });
283 } 283 }
284 284
285 /// Wait for all microtasks to complete. 285 /// Wait for all microtasks to complete.
286 Future flushMicrotasks() => new Future.delayed(Duration.ZERO); 286 Future flushMicrotasks() => new Future.delayed(Duration.ZERO);
OLDNEW
« no previous file with comments | « test/stream_queue_test.dart ('k') | test/stream_zip_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698