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

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

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 1 month 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') | tests/isolate/illegal_msg_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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library test;
6
7 import 'package:expect/expect.dart';
8 import 'dart:isolate';
9 import "package:async_helper/async_helper.dart";
10
11 funcFoo(x) => x + 2;
12
13 foo() {
14 stream.single.then((msg) {
15 IsolateSink sink = msg;
16 sink.add(499);
17 sink.close();
18 });
19 }
20
21 main() {
22 var box = new MessageBox();
23 var snd = streamSpawnFunction(foo);
24 var caught_exception = false;
25 try {
26 snd.add(funcFoo);
27 } catch (e) {
28 caught_exception = true;
29 }
30 snd.add(box.sink);
31 snd.close();
32
33 asyncStart();
34 box.stream.single.then((msg) {
35 Expect.equals(499, msg);
36 asyncEnd();
37 });
38 }
OLDNEW
« no previous file with comments | « tests/isolate/global_error_handler_test.dart ('k') | tests/isolate/illegal_msg_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698