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

Side by Side Diff: tests/isolate/illegal_msg_stream_test.dart

Issue 12516015: Add library tags so that the tests work in dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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/isolate/global_error_handler_test.dart ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library test;
6
5 import 'dart:isolate'; 7 import 'dart:isolate';
6 8
7 funcFoo(x) => x + 2; 9 funcFoo(x) => x + 2;
8 10
9 foo() { 11 foo() {
10 stream.single.then((msg) { 12 stream.single.then((msg) {
11 IsolateSink sink = msg; 13 IsolateSink sink = msg;
12 sink.add(499); 14 sink.add(499);
13 sink.close(); 15 sink.close();
14 }); 16 });
15 } 17 }
16 18
17 main() { 19 main() {
18 var box = new MessageBox(); 20 var box = new MessageBox();
19 var snd = streamSpawnFunction(foo); 21 var snd = streamSpawnFunction(foo);
20 var caught_exception = false; 22 var caught_exception = false;
21 try { 23 try {
22 snd.add(funcFoo); 24 snd.add(funcFoo);
23 } catch (e) { 25 } catch (e) {
24 caught_exception = true; 26 caught_exception = true;
25 } 27 }
26 snd.add(box.sink); 28 snd.add(box.sink);
27 snd.close(); 29 snd.close();
28 30
29 box.stream.single.then((msg) { 31 box.stream.single.then((msg) {
30 Expect.equals(499, msg); 32 Expect.equals(499, msg);
31 }); 33 });
32 } 34 }
OLDNEW
« no previous file with comments | « tests/isolate/global_error_handler_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698