OLD | NEW |
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 MintMakerTest; | 5 library MintMakerTest; |
| 6 import 'dart:async'; |
6 import 'dart:isolate'; | 7 import 'dart:isolate'; |
7 import '../../pkg/unittest/lib/unittest.dart'; | 8 import '../../pkg/unittest/lib/unittest.dart'; |
8 | 9 |
9 class Mint { | 10 class Mint { |
10 Map<SendPort, Purse> _registry; | 11 Map<SendPort, Purse> _registry; |
11 SendPort port; | 12 SendPort port; |
12 | 13 |
13 Mint() : _registry = new Map<SendPort, Purse>() { | 14 Mint() : _registry = new Map<SendPort, Purse>() { |
14 ReceivePort mintPort = new ReceivePort(); | 15 ReceivePort mintPort = new ReceivePort(); |
15 port = mintPort.sendPort; | 16 port = mintPort.sendPort; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 170 |
170 sprouted.deposit(purse, 42); | 171 sprouted.deposit(purse, 42); |
171 _checkBalance(sprouted, 0 + 5 + 42); | 172 _checkBalance(sprouted, 0 + 5 + 42); |
172 _checkBalance(purse, 100 - 5 - 42); | 173 _checkBalance(purse, 100 - 5 - 42); |
173 })); | 174 })); |
174 })); | 175 })); |
175 })); | 176 })); |
176 })); | 177 })); |
177 }); | 178 }); |
178 } | 179 } |
OLD | NEW |