| 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=MintMakerPromiseWithStubsTest.dart:Mint,Purse | 5 // IsolateStubs=MintMakerPromiseWithStubsTest.dart:Mint,Purse |
| 6 | 6 |
| 7 #import("../../isolate/src/TestFramework.dart"); | 7 #import("../../isolate/src/TestFramework.dart"); |
| 8 | 8 |
| 9 /* class = Mint (file:/usr/local/google/users/scheglov/Clients/Dart/dart/tests/s
tub-generator/src/MintMakerPromiseWithStubsTest.dart/MintMakerPromiseWithStubsTe
st.dart: 9) */ | 9 /* class = Mint (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Min
tMakerPromiseWithStubsTest.dart: 9) */ |
| 10 | 10 |
| 11 interface Mint$Proxy { | 11 interface Mint$Proxy { |
| 12 Purse$Proxy createPurse(int balance); | 12 Purse$Proxy createPurse(int balance); |
| 13 } | 13 } |
| 14 | 14 |
| 15 class Mint$ProxyImpl extends ProxyImpl implements Mint$Proxy { | 15 class Mint$ProxyImpl extends ProxyImpl implements Mint$Proxy { |
| 16 Mint$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } | 16 Mint$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } |
| 17 Mint$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null])
) { } | 17 Mint$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null])
) { } |
| 18 factory Mint$ProxyImpl.createIsolate() { | 18 factory Mint$ProxyImpl.createIsolate() { |
| 19 Proxy isolate = new Proxy.forIsolate(new Mint$Dispatcher$Isolate()); | 19 Proxy isolate = new Proxy.forIsolate(new Mint$Dispatcher$Isolate()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 void main() { | 52 void main() { |
| 53 this.port.receive(void _(var message, SendPort replyTo) { | 53 this.port.receive(void _(var message, SendPort replyTo) { |
| 54 Mint thing = new Mint(); | 54 Mint thing = new Mint(); |
| 55 SendPort port = Dispatcher.serve(new Mint$Dispatcher(thing)); | 55 SendPort port = Dispatcher.serve(new Mint$Dispatcher(thing)); |
| 56 Proxy proxy = new Proxy.forPort(replyTo); | 56 Proxy proxy = new Proxy.forPort(replyTo); |
| 57 proxy.send([port]); | 57 proxy.send([port]); |
| 58 }); | 58 }); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 /* class = Purse (file:/usr/local/google/users/scheglov/Clients/Dart/dart/tests/
stub-generator/src/MintMakerPromiseWithStubsTest.dart/MintMakerPromiseWithStubsT
est.dart: 17) */ | 62 /* class = Purse (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Mi
ntMakerPromiseWithStubsTest.dart: 17) */ |
| 63 | 63 |
| 64 interface Purse$Proxy { | 64 interface Purse$Proxy { |
| 65 Promise<int> queryBalance(); | 65 Promise<int> queryBalance(); |
| 66 | 66 |
| 67 Purse$Proxy sproutPurse(); | 67 Purse$Proxy sproutPurse(); |
| 68 | 68 |
| 69 Promise<int> deposit(int amount, Purse$Proxy source); | 69 Promise<int> deposit(int amount, Purse$Proxy source); |
| 70 } | 70 } |
| 71 | 71 |
| 72 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy { | 72 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 }); | 231 }); |
| 232 }); | 232 }); |
| 233 expect.succeeded(); | 233 expect.succeeded(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } | 236 } |
| 237 | 237 |
| 238 main() { | 238 main() { |
| 239 runTests([MintMakerPromiseWithStubsTest.testMain]); | 239 runTests([MintMakerPromiseWithStubsTest.testMain]); |
| 240 } | 240 } |
| OLD | NEW |