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 // Things that should be "auto-generated" are between AUTO START and | 5 // Things that should be "auto-generated" are between AUTO START and |
6 // AUTO END (or just AUTO if it's a single line). | 6 // AUTO END (or just AUTO if it's a single line). |
7 | 7 |
8 #library("MintMakerTest"); | 8 #library("MintMakerTest"); |
9 #import("dart:isolate"); | 9 #import("dart:isolate"); |
10 #import('../../../lib/unittest/unittest.dart'); | 10 #import('../../lib/unittest/unittest.dart'); |
11 | 11 |
12 class Mint { | 12 class Mint { |
13 Mint() : registry_ = new Map<SendPort, Purse>() { | 13 Mint() : registry_ = new Map<SendPort, Purse>() { |
14 // AUTO START | 14 // AUTO START |
15 ReceivePort mintPort = new ReceivePort(); | 15 ReceivePort mintPort = new ReceivePort(); |
16 port = mintPort.toSendPort(); | 16 port = mintPort.toSendPort(); |
17 serveMint(mintPort); | 17 serveMint(mintPort); |
18 // AUTO END | 18 // AUTO END |
19 } | 19 } |
20 | 20 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 sprouted...deposit(purse, 5); | 257 sprouted...deposit(purse, 5); |
258 Expect.equals(0 + 5, sprouted.queryBalance()); | 258 Expect.equals(0 + 5, sprouted.queryBalance()); |
259 Expect.equals(100 - 5, purse.queryBalance()); | 259 Expect.equals(100 - 5, purse.queryBalance()); |
260 | 260 |
261 sprouted...deposit(purse, 42); | 261 sprouted...deposit(purse, 42); |
262 Expect.equals(0 + 5 + 42, sprouted.queryBalance()); | 262 Expect.equals(0 + 5 + 42, sprouted.queryBalance()); |
263 Expect.equals(100 - 5 - 42, purse.queryBalance()); | 263 Expect.equals(100 - 5 - 42, purse.queryBalance()); |
264 } | 264 } |
265 */ | 265 */ |
266 } | 266 } |
OLD | NEW |