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

Side by Side Diff: tests/language/vm/causal_async_exception_stack_test.dart

Issue 2694013003: Add tests of line numbers to causal async stack tests (Closed)
Patch Set: rmacnak review Created 3 years, 10 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
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 'package:unittest/unittest.dart'; 5 import 'package:unittest/unittest.dart';
6 6
7 thrower() async { 7 thrower() async {
8 throw 'oops'; 8 throw 'oops';
9 } 9 }
10 10
(...skipping 11 matching lines...) Expand all
22 print(i); 22 print(i);
23 } 23 }
24 } 24 }
25 25
26 main() async { 26 main() async {
27 // Test async and async*. 27 // Test async and async*.
28 try { 28 try {
29 await foo(); 29 await foo();
30 } catch (e, st) { 30 } catch (e, st) {
31 expect(st.toString(), stringContainsInOrder([ 31 expect(st.toString(), stringContainsInOrder([
32 'thrower', 32 'thrower', '.dart:8',
33 '<asynchronous suspension>', 33 '<asynchronous suspension>',
34 'generator', 34 'generator', '.dart:17',
35 '<asynchronous suspension>', 35 '<asynchronous suspension>',
36 'foo', 36 'foo', '.dart:21',
37 '<asynchronous suspension>', 37 '<asynchronous suspension>',
38 'main', 38 'main',
39 ])); 39 ]));
40 } 40 }
41 41
42 inner() async { 42 inner() async {
43 deep() async { 43 deep() async {
44 await thrower(); 44 await thrower();
45 } 45 }
46 await deep(); 46 await deep();
(...skipping 13 matching lines...) Expand all
60 'main', 60 'main',
61 '<asynchronous suspension>', 61 '<asynchronous suspension>',
62 ])); 62 ]));
63 } 63 }
64 64
65 // Test for correct linkage. 65 // Test for correct linkage.
66 try { 66 try {
67 await thrower(); 67 await thrower();
68 } catch(e, st) { 68 } catch(e, st) {
69 expect(st.toString(), stringContainsInOrder([ 69 expect(st.toString(), stringContainsInOrder([
70 'thrower', 70 'thrower', '.dart:8',
71 '<asynchronous suspension>', 71 '<asynchronous suspension>',
72 'main', 72 'main', '.dart:67',
73 ])); 73 ]));
74 } 74 }
75 } 75 }
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698