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 #import("../../isolate/src/TestFramework.dart"); | 7 #import("../../isolate/src/TestFramework.dart"); |
8 | 8 |
9 /* class = Purse (tests/stub-generator/src/MintMakerFullyIsolatedTest.dart/MintM
akerFullyIsolatedTest.dart: 9) */ | 9 /* class = Purse (tests/stub-generator/src/MintMakerFullyIsolatedTest.dart/MintM
akerFullyIsolatedTest.dart: 9) */ |
10 | 10 |
11 interface Purse$Proxy { | 11 interface Purse$Proxy { |
12 Promise<int> queryBalance(); | 12 Promise<int> queryBalance(); |
13 | 13 |
14 Purse$Proxy sproutPurse(); | 14 Purse$Proxy sproutPurse(); |
15 | 15 |
16 Promise<int> deposit(int amount, Purse$Proxy source); | 16 Promise<int> deposit(int amount, Purse$Proxy source); |
17 } | 17 } |
18 | 18 |
19 class Purse$ProxyImpl extends Proxy implements Purse$Proxy { | 19 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy { |
20 Purse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } | 20 Purse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } |
21 Purse$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null]
)) { } | 21 Purse$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null]
)) { } |
22 factory Purse$ProxyImpl.createIsolate() { | 22 factory Purse$ProxyImpl.createIsolate() { |
23 Proxy isolate = new Proxy.forIsolate(new Purse$Dispatcher$Isolate()); | 23 Proxy isolate = new Proxy.forIsolate(new Purse$Dispatcher$Isolate()); |
24 return new Purse$ProxyImpl.forIsolate(isolate); | 24 return new Purse$ProxyImpl.forIsolate(isolate); |
25 } | 25 } |
26 factory Purse$ProxyImpl.localProxy(Purse obj) { | 26 factory Purse$ProxyImpl.localProxy(Purse obj) { |
27 return new Purse$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve(
new Purse$Dispatcher(obj)))); | 27 return new Purse$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve(
new Purse$Dispatcher(obj)))); |
28 } | 28 } |
29 | 29 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 /* class = PowerfulPurse (tests/stub-generator/src/MintMakerFullyIsolatedTest.da
rt/MintMakerFullyIsolatedTest.dart: 18) */ | 86 /* class = PowerfulPurse (tests/stub-generator/src/MintMakerFullyIsolatedTest.da
rt/MintMakerFullyIsolatedTest.dart: 18) */ |
87 | 87 |
88 interface PowerfulPurse$Proxy { | 88 interface PowerfulPurse$Proxy { |
89 void init(Mint$Proxy mint, int balance); | 89 void init(Mint$Proxy mint, int balance); |
90 | 90 |
91 Promise<int> grab(int amount); | 91 Promise<int> grab(int amount); |
92 | 92 |
93 Purse$Proxy weak(); | 93 Purse$Proxy weak(); |
94 } | 94 } |
95 | 95 |
96 class PowerfulPurse$ProxyImpl extends Proxy implements PowerfulPurse$Proxy { | 96 class PowerfulPurse$ProxyImpl extends ProxyImpl implements PowerfulPurse$Proxy { |
97 PowerfulPurse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } | 97 PowerfulPurse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } |
98 PowerfulPurse$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.cal
l([null])) { } | 98 PowerfulPurse$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.cal
l([null])) { } |
99 factory PowerfulPurse$ProxyImpl.createIsolate() { | 99 factory PowerfulPurse$ProxyImpl.createIsolate() { |
100 Proxy isolate = new Proxy.forIsolate(new PowerfulPurse$Dispatcher$Isolate())
; | 100 Proxy isolate = new Proxy.forIsolate(new PowerfulPurse$Dispatcher$Isolate())
; |
101 return new PowerfulPurse$ProxyImpl.forIsolate(isolate); | 101 return new PowerfulPurse$ProxyImpl.forIsolate(isolate); |
102 } | 102 } |
103 factory PowerfulPurse$ProxyImpl.localProxy(PowerfulPurse obj) { | 103 factory PowerfulPurse$ProxyImpl.localProxy(PowerfulPurse obj) { |
104 return new PowerfulPurse$ProxyImpl(new Promise<SendPort>.fromValue(Dispatche
r.serve(new PowerfulPurse$Dispatcher(obj)))); | 104 return new PowerfulPurse$ProxyImpl(new Promise<SendPort>.fromValue(Dispatche
r.serve(new PowerfulPurse$Dispatcher(obj)))); |
105 } | 105 } |
106 | 106 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 162 } |
163 | 163 |
164 /* class = Mint (tests/stub-generator/src/MintMakerFullyIsolatedTest.dart/MintMa
kerFullyIsolatedTest.dart: 28) */ | 164 /* class = Mint (tests/stub-generator/src/MintMakerFullyIsolatedTest.dart/MintMa
kerFullyIsolatedTest.dart: 28) */ |
165 | 165 |
166 interface Mint$Proxy { | 166 interface Mint$Proxy { |
167 Purse$Proxy createPurse(int balance); | 167 Purse$Proxy createPurse(int balance); |
168 | 168 |
169 PowerfulPurse$Proxy promote(Purse$Proxy purse); | 169 PowerfulPurse$Proxy promote(Purse$Proxy purse); |
170 } | 170 } |
171 | 171 |
172 class Mint$ProxyImpl extends Proxy implements Mint$Proxy { | 172 class Mint$ProxyImpl extends ProxyImpl implements Mint$Proxy { |
173 Mint$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } | 173 Mint$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } |
174 Mint$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null])
) { } | 174 Mint$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null])
) { } |
175 factory Mint$ProxyImpl.createIsolate() { | 175 factory Mint$ProxyImpl.createIsolate() { |
176 Proxy isolate = new Proxy.forIsolate(new Mint$Dispatcher$Isolate()); | 176 Proxy isolate = new Proxy.forIsolate(new Mint$Dispatcher$Isolate()); |
177 return new Mint$ProxyImpl.forIsolate(isolate); | 177 return new Mint$ProxyImpl.forIsolate(isolate); |
178 } | 178 } |
179 factory Mint$ProxyImpl.localProxy(Mint obj) { | 179 factory Mint$ProxyImpl.localProxy(Mint obj) { |
180 return new Mint$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve(n
ew Mint$Dispatcher(obj)))); | 180 return new Mint$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve(n
ew Mint$Dispatcher(obj)))); |
181 } | 181 } |
182 | 182 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 Promise<int> allDone = new Promise<int>(); | 423 Promise<int> allDone = new Promise<int>(); |
424 allDone.waitFor([d3, inner, inner2], 3); | 424 allDone.waitFor([d3, inner, inner2], 3); |
425 allDone.then((_) => expect.succeeded()); | 425 allDone.then((_) => expect.succeeded()); |
426 } | 426 } |
427 | 427 |
428 } | 428 } |
429 | 429 |
430 main() { | 430 main() { |
431 runTests([MintMakerFullyIsolatedTest.testMain]); | 431 runTests([MintMakerFullyIsolatedTest.testMain]); |
432 } | 432 } |
OLD | NEW |