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

Side by Side Diff: tests/isolate/src/TestFramework.dart

Issue 9017016: Avoid error about instantiating abstract class AsynchronousTestCase. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #library("TestFramework"); 5 #library("TestFramework");
6 #import("dart:coreimpl"); 6 #import("dart:coreimpl");
7 7
8 8
9 typedef void AsynchronousTestFunction(TestExpectation check); 9 typedef void AsynchronousTestFunction(TestExpectation check);
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 } 270 }
271 271
272 void removeRunning() { 272 void removeRunning() {
273 if (--running == 0) { 273 if (--running == 0) {
274 keepalive.toSendPort().send(null, null); 274 keepalive.toSendPort().send(null, null);
275 keepalive = null; 275 keepalive = null;
276 } 276 }
277 } 277 }
278 278
279 // AsynchronousTestCase.run() calls variable test, not function performTest.
280 void performTest() {
281 Expect.fail('performTest called in AsynchronousTestCase');
282 }
283
279 AsynchronousTestFunction test; 284 AsynchronousTestFunction test;
280 285
281 static int running = 0; 286 static int running = 0;
282 static ReceivePort keepalive = null; 287 static ReceivePort keepalive = null;
283 288
284 } 289 }
285 290
286 // TODO(mattsh) - remove this once we have migrated the rpc system 291 // TODO(mattsh) - remove this once we have migrated the rpc system
287 class TestPromise<T> extends PromiseImpl<T> { 292 class TestPromise<T> extends PromiseImpl<T> {
288 293
289 TestPromise(this.expect) : super(); 294 TestPromise(this.expect) : super();
290 295
291 void addCompleteHandler(void completeHandler(T result)) { 296 void addCompleteHandler(void completeHandler(T result)) {
292 super.addCompleteHandler(expect.runs1((T result) { 297 super.addCompleteHandler(expect.runs1((T result) {
293 completeHandler(result); 298 completeHandler(result);
294 })); 299 }));
295 } 300 }
296 301
297 final TestExpectation expect; 302 final TestExpectation expect;
298 303
299 } 304 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698