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

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

Issue 11778030: Test fixes for dartium (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « tests/lib/async/stream_min_max_test.dart ('k') | tests/lib/lib.status » ('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;
7
6 import 'dart:async'; 8 import 'dart:async';
7 import 'dart:isolate'; 9 import 'dart:isolate';
8 import '../../../pkg/unittest/lib/unittest.dart'; 10 import '../../../pkg/unittest/lib/unittest.dart';
9 import 'event_helper.dart'; 11 import 'event_helper.dart';
10 12
11 main() { 13 main() {
12 test("single", () { 14 test("single", () {
13 StreamController c = new StreamController(); 15 StreamController c = new StreamController();
14 Future f = c.single; 16 Future f = c.single;
15 f.then(expectAsync1((v) { Expect.equals(42, v);})); 17 f.then(expectAsync1((v) { Expect.equals(42, v);}));
(...skipping 24 matching lines...) Expand all
40 }); 42 });
41 43
42 test("single error 3", () { 44 test("single error 3", () {
43 StreamController c = new StreamController(); 45 StreamController c = new StreamController();
44 Future f = c.single; 46 Future f = c.single;
45 f.catchError(expectAsync1((e) { Expect.equals("error", e.error); })); 47 f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
46 Events errorEvents = new Events()..add(499)..error("error")..close(); 48 Events errorEvents = new Events()..add(499)..error("error")..close();
47 errorEvents.replay(c); 49 errorEvents.replay(c);
48 }); 50 });
49 } 51 }
OLDNEW
« no previous file with comments | « tests/lib/async/stream_min_max_test.dart ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698