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

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

Issue 1133983002: Move isolate tests to lib/isolate. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix merge Created 5 years, 7 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/lib/async/stream_single_test.dart ('k') | tests/lib/async/timer_cancel_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Test the basic StreamController and StreamController.singleSubscription. 5 // Test the basic StreamController and StreamController.singleSubscription.
6 library stream_single_test; 6 library stream_single_test;
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:isolate';
11 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
12 import 'event_helper.dart'; 11 import 'event_helper.dart';
13 12
14 main() { 13 main() {
15 test("tomulti 1", () { 14 test("tomulti 1", () {
16 StreamController c = new StreamController<int>(sync: true); 15 StreamController c = new StreamController<int>(sync: true);
17 Stream<int> multi = c.stream.asBroadcastStream(); 16 Stream<int> multi = c.stream.asBroadcastStream();
18 // Listen twice. 17 // Listen twice.
19 multi.listen(expectAsync((v) => Expect.equals(42, v))); 18 multi.listen(expectAsync((v) => Expect.equals(42, v)));
20 multi.listen(expectAsync((v) => Expect.equals(42, v))); 19 multi.listen(expectAsync((v) => Expect.equals(42, v)));
(...skipping 23 matching lines...) Expand all
44 Events actual2 = new Events.capture(multi); 43 Events actual2 = new Events.capture(multi);
45 actual1.onDone(expectAsync(() { 44 actual1.onDone(expectAsync(() {
46 Expect.listEquals(expected.events, actual1.events); 45 Expect.listEquals(expected.events, actual1.events);
47 })); 46 }));
48 actual2.onDone(expectAsync(() { 47 actual2.onDone(expectAsync(() {
49 Expect.listEquals(expected.events, actual2.events); 48 Expect.listEquals(expected.events, actual2.events);
50 })); 49 }));
51 expected.replay(c); 50 expected.replay(c);
52 }); 51 });
53 } 52 }
OLDNEW
« no previous file with comments | « tests/lib/async/stream_single_test.dart ('k') | tests/lib/async/timer_cancel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698