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

Side by Side Diff: tests/language/async_throw_in_catch_test.dart

Issue 990363002: Suspend after async generator terminates (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 months 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 | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import "dart:async"; 5 import "dart:async";
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 8
9 class Tracer { 9 class Tracer {
10 final String expected; 10 final String expected;
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 } finally { 432 } finally {
433 await new Future.value(3); /// forceAwait: continued 433 await new Future.value(3); /// forceAwait: continued
434 tracer.trace("c"); 434 tracer.trace("c");
435 } 435 }
436 tracer.trace("d"); 436 tracer.trace("d");
437 } 437 }
438 tracer.trace("e"); 438 tracer.trace("e");
439 } 439 }
440 440
441 runTest(expectedTrace, fun, [expectedError]) async { 441 runTest(expectedTrace, fun, [expectedError]) async {
442 Tracer tracer = new Tracer(expectedTrace); 442 Tracer tracer = new Tracer(expectedTrace, expectedTrace);
443 try { 443 try {
444 await fun(tracer); 444 await fun(tracer);
445 } catch (error) { 445 } catch (error) {
446 Expect.equals(expectedError, error); 446 Expect.equals(expectedError, error);
447 tracer.trace("X"); 447 tracer.trace("X");
448 } 448 }
449 tracer.done(); 449 tracer.done();
450 } 450 }
451 451
452 test() async { 452 test() async {
(...skipping 14 matching lines...) Expand all
467 await runTest("abcdefgX", foo14, "Error3"); 467 await runTest("abcdefgX", foo14, "Error3");
468 await runTest("abcdefg", foo15); 468 await runTest("abcdefg", foo15);
469 await runTest("abcdfg", foo16); 469 await runTest("abcdfg", foo16);
470 await runTest("abcdef", foo17); 470 await runTest("abcdef", foo17);
471 await runTest("abcde", foo18); 471 await runTest("abcde", foo18);
472 } 472 }
473 473
474 void main() { 474 void main() {
475 asyncTest(test); 475 asyncTest(test);
476 } 476 }
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698