Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: tests/stub-generator/src/MintMakerPromiseWithStubsTest-generatedTest.dart

Issue 8383034: Rename various Proxy classes. Provide a Proxy interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Min tMakerPromiseWithStubsTest.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 Proxy 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());
20 return new Mint$ProxyImpl.forIsolate(isolate); 20 return new Mint$ProxyImpl.forIsolate(isolate);
21 } 21 }
22 factory Mint$ProxyImpl.localProxy(Mint obj) { 22 factory Mint$ProxyImpl.localProxy(Mint obj) {
23 return new Mint$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve(n ew Mint$Dispatcher(obj)))); 23 return new Mint$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve(n ew Mint$Dispatcher(obj))));
24 } 24 }
25 25
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 /* class = Purse (tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart/Mi ntMakerPromiseWithStubsTest.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 Proxy implements Purse$Proxy { 72 class Purse$ProxyImpl extends ProxyImpl implements Purse$Proxy {
73 Purse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { } 73 Purse$ProxyImpl(Promise<SendPort> port) : super.forReply(port) { }
74 Purse$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null] )) { } 74 Purse$ProxyImpl.forIsolate(Proxy isolate) : super.forReply(isolate.call([null] )) { }
75 factory Purse$ProxyImpl.createIsolate() { 75 factory Purse$ProxyImpl.createIsolate() {
76 Proxy isolate = new Proxy.forIsolate(new Purse$Dispatcher$Isolate()); 76 Proxy isolate = new Proxy.forIsolate(new Purse$Dispatcher$Isolate());
77 return new Purse$ProxyImpl.forIsolate(isolate); 77 return new Purse$ProxyImpl.forIsolate(isolate);
78 } 78 }
79 factory Purse$ProxyImpl.localProxy(Purse obj) { 79 factory Purse$ProxyImpl.localProxy(Purse obj) {
80 return new Purse$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve( new Purse$Dispatcher(obj)))); 80 return new Purse$ProxyImpl(new Promise<SendPort>.fromValue(Dispatcher.serve( new Purse$Dispatcher(obj))));
81 } 81 }
82 82
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698