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

Side by Side Diff: pkg/unittest/test/unittest_test_utils.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 | « pkg/serialization/test/serialization_test.dart ('k') | runtime/bin/eventhandler_patch.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of unittestTest; 5 part of unittestTest;
6 6
7 Future _defer(void fn()) { 7 Future _defer(void fn()) {
8 return new Future.sync(fn); 8 return new Future.sync(fn);
9 } 9 }
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 }; 71 };
72 72
73 makeImmediateSetup(index, s) => () { 73 makeImmediateSetup(index, s) => () {
74 s.write('l$index U '); 74 s.write('l$index U ');
75 }; 75 };
76 76
77 makeImmediateTeardown(index, s) => () { 77 makeImmediateTeardown(index, s) => () {
78 s.write('l$index D '); 78 s.write('l$index D ');
79 }; 79 };
80 80
81 runTestInIsolate() { 81 runTestInIsolate(sendport) {
82 port.receive((_, sendport) { 82 var testConfig = new TestConfiguration(sendport);
83 var testConfig = new TestConfiguration(sendport); 83 unittestConfiguration = testConfig;
84 unittestConfiguration = testConfig; 84 testFunction(testConfig);
85 testFunction(testConfig);
86 });
87 } 85 }
88 86
89 main() { 87 main() {
90 spawnFunction(runTestInIsolate) 88 var replyPort = new ReceivePort();
91 .call('') 89 Isolate.spawn(runTestInIsolate, replyPort.sendPort);
92 .then((String msg) { 90 replyPort.first.then((String msg) {
93 expect(msg.trim(), equals(expected)); 91 expect(msg.trim(), equals(expected));
94 }); 92 });
95 } 93 }
OLDNEW
« no previous file with comments | « pkg/serialization/test/serialization_test.dart ('k') | runtime/bin/eventhandler_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698