OLD | NEW |
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 #library("MandelIsolateTest"); | 5 #library('MandelIsolateTest'); |
| 6 #import('dart:isolate'); |
6 #import('TestFramework.dart'); | 7 #import('TestFramework.dart'); |
7 | 8 |
8 final TERMINATION_MESSAGE = -1; | 9 final TERMINATION_MESSAGE = -1; |
9 final N = 100; | 10 final N = 100; |
10 final ISOLATES = 20; | 11 final ISOLATES = 20; |
11 | 12 |
12 void test(TestExpectation expect) { | 13 void test(TestExpectation expect) { |
13 final state = new MandelbrotState(); | 14 final state = new MandelbrotState(); |
14 expect.completes(state._validated.future).then((result) { | 15 expect.completes(state._validated.future).then((result) { |
15 Expect.isTrue(result); | 16 Expect.isTrue(result); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 result[x] = i; | 147 result[x] = i; |
147 } | 148 } |
148 return result; | 149 return result; |
149 } | 150 } |
150 | 151 |
151 } | 152 } |
152 | 153 |
153 main() { | 154 main() { |
154 runTests([test]); | 155 runTests([test]); |
155 } | 156 } |
OLD | NEW |