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"); | 7 #library("MintMakerPromiseWithStubsTest-generatedTest"); |
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: 10) */ | 10 /* class = Mint (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Min
tMakerPromiseWithStubsTest.dart: 10) */ |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 void main() { | 127 void main() { |
128 this.port.receive(void _(var message, SendPort replyTo) { | 128 this.port.receive(void _(var message, SendPort replyTo) { |
129 Purse thing = new Purse(); | 129 Purse thing = new Purse(); |
130 SendPort port = Dispatcher.serve(new Purse$Dispatcher(thing)); | 130 SendPort port = Dispatcher.serve(new Purse$Dispatcher(thing)); |
131 Proxy proxy = new Proxy.forPort(replyTo); | 131 Proxy proxy = new Proxy.forPort(replyTo); |
132 proxy.send([port]); | 132 proxy.send([port]); |
133 }); | 133 }); |
134 } | 134 } |
135 } | 135 } |
136 interface Mint factory MintImpl { | 136 interface Mint default MintImpl { |
137 | 137 |
138 Mint(); | 138 Mint(); |
139 | 139 |
140 Purse createPurse(int balance); | 140 Purse createPurse(int balance); |
141 | 141 |
142 } | 142 } |
143 | 143 |
144 interface Purse factory PurseImpl { | 144 interface Purse default PurseImpl { |
145 | 145 |
146 Purse(); | 146 Purse(); |
147 | 147 |
148 int queryBalance(); | 148 int queryBalance(); |
149 Purse sproutPurse(); | 149 Purse sproutPurse(); |
150 Promise<int> deposit(int amount, Purse$Proxy source); | 150 Promise<int> deposit(int amount, Purse$Proxy source); |
151 | 151 |
152 } | 152 } |
153 | 153 |
154 class MintImpl implements Mint { | 154 class MintImpl implements Mint { |
(...skipping 91 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 |