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 // IsolateStubs=MintMakerFullyIsolatedTest.dart:Mint,Purse,PowerfulPurse | 5 // IsolateStubs=MintMakerFullyIsolatedTest.dart:Mint,Purse,PowerfulPurse |
6 | 6 |
7 interface Purse { | 7 interface Purse { |
8 Purse(); | 8 Purse(); |
9 int queryBalance(); | 9 int queryBalance(); |
10 Purse$Proxy sproutPurse(); | 10 Purse$Proxy sproutPurse(); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 results.add(promise.then((int actual) { | 212 results.add(promise.then((int actual) { |
213 //print('done ' + expected + '/' + actual); | 213 //print('done ' + expected + '/' + actual); |
214 Expect.equals(expected, actual); | 214 Expect.equals(expected, actual); |
215 })); | 215 })); |
216 } | 216 } |
217 | 217 |
218 static void expectDone(int n) { | 218 static void expectDone(int n) { |
219 if (results === null) { | 219 if (results === null) { |
220 Expect.equals(0, n); | 220 Expect.equals(0, n); |
221 //print('##DONE##'); | 221 print('##DONE##'); |
222 } else { | 222 } else { |
223 Promise done = new Promise(); | 223 Promise done = new Promise(); |
224 done.waitFor(results, results.length); | 224 done.waitFor(results, results.length); |
225 done.then((ignored) { | 225 done.then((ignored) { |
226 //print('done all ' + n + '/' + results.length); | 226 //print('done all ' + n + '/' + results.length); |
227 Expect.equals(n, results.length); | 227 Expect.equals(n, results.length); |
228 //print('##DONE##'); | 228 print('##DONE##'); |
229 }); | 229 }); |
230 } | 230 } |
231 } | 231 } |
232 | 232 |
233 } | 233 } |
234 | 234 |
235 main() { | 235 main() { |
236 MintMakerFullyIsolatedTest.testMain(); | 236 MintMakerFullyIsolatedTest.testMain(); |
237 } | 237 } |
OLD | NEW |