| 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 #library("MintMakerPromiseWithStubsTest-generatedTest.dart"); | 7 #library("MintMakerPromiseWithStubsTest"); |
| 8 #import("../../isolate/src/TestFramework.dart"); | 8 #import("../../isolate/src/TestFramework.dart"); |
| 9 | 9 |
| 10 /* class = Mint (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Min
tMakerPromiseWithStubsTest.dart: 9) */ | 10 /* class = Mint (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Min
tMakerPromiseWithStubsTest.dart: 10) */ |
| 11 | 11 |
| 12 interface Mint$Proxy extends Proxy { | 12 interface Mint$Proxy extends Proxy { |
| 13 Purse$Proxy createPurse(int balance); | 13 Purse$Proxy createPurse(int balance); |
| 14 } | 14 } |
| 15 | 15 |
| 16 class Mint$ProxyImpl extends ProxyImpl implements Mint$Proxy { | 16 class Mint$ProxyImpl extends ProxyImpl implements Mint$Proxy { |
| 17 Mint$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } | 17 Mint$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } |
| 18 Mint$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null])
) { } | 18 Mint$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null])
) { } |
| 19 factory Mint$ProxyImpl.createIsolate() { | 19 factory Mint$ProxyImpl.createIsolate() { |
| 20 Proxy isolate = new Proxy.forIsolate(new Mint$Dispatcher$Isolate()); | 20 Proxy isolate = new Proxy.forIsolate(new Mint$Dispatcher$Isolate()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void main() { | 53 void main() { |
| 54 this.port.receive(void _(var message, SendPort replyTo) { | 54 this.port.receive(void _(var message, SendPort replyTo) { |
| 55 Mint thing = new Mint(); | 55 Mint thing = new Mint(); |
| 56 SendPort port = Dispatcher.serve(new Mint$Dispatcher(thing)); | 56 SendPort port = Dispatcher.serve(new Mint$Dispatcher(thing)); |
| 57 Proxy proxy = new Proxy.forPort(replyTo); | 57 Proxy proxy = new Proxy.forPort(replyTo); |
| 58 proxy.send([port]); | 58 proxy.send([port]); |
| 59 }); | 59 }); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 /* class = Purse (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Mi
ntMakerPromiseWithStubsTest.dart: 17) */ | 63 /* class = Purse (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Mi
ntMakerPromiseWithStubsTest.dart: 18) */ |
| 64 | 64 |
| 65 interface Purse$Proxy extends Proxy { | 65 interface Purse$Proxy extends Proxy { |
| 66 Promise<int> queryBalance(); | 66 Promise<int> queryBalance(); |
| 67 | 67 |
| 68 Purse$Proxy sproutPurse(); | 68 Purse$Proxy sproutPurse(); |
| 69 | 69 |
| 70 Promise<int> deposit(int amount, Purse$Proxy source); | 70 Promise<int> deposit(int amount, Purse$Proxy source); |
| 71 } | 71 } |
| 72 | 72 |
| 73 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy { | 73 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy { |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 expect.succeeded(); | 246 expect.succeeded(); |
| 247 print("##DONE##"); | 247 print("##DONE##"); |
| 248 }); | 248 }); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } | 251 } |
| 252 | 252 |
| 253 main() { | 253 main() { |
| 254 runTests([MintMakerPromiseWithStubsTest.testMain]); | 254 runTests([MintMakerPromiseWithStubsTest.testMain]); |
| 255 } | 255 } |
| OLD | NEW |