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

Side by Side Diff: tests/standalone_2/causal_async_stack_test.dart

Issue 2984363004: Migrate first block of tests in standalone to standalone_2 (Closed)
Patch Set: Remove Expect.throws Created 3 years, 4 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
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 // VMOptions=--causal_async_stacks 4 // VMOptions=--causal_async_stacks
5 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 baz() async { 8 baz() async {
9 throw "Bad!"; 9 throw "Bad!";
10 } 10 }
11 11
12 bar() async { 12 bar() async {
13 await baz(); 13 await baz();
14 } 14 }
15 15
16 foo() async { 16 foo() async {
17 await bar(); 17 await bar();
18 } 18 }
19 19
20 main() async { 20 main() async {
21 try { 21 try {
22 await foo(); 22 await foo();
23 } catch (e, st) { 23 } catch (e, st) {
24 Expect.isTrue(st.toString().contains("baz")); 24 Expect.isTrue(st.toString().contains("baz"));
25 Expect.isTrue(st.toString().contains("bar")); 25 Expect.isTrue(st.toString().contains("bar"));
26 Expect.isTrue(st.toString().contains("foo")); 26 Expect.isTrue(st.toString().contains("foo"));
27 Expect.isTrue(st.toString().contains("main")); 27 Expect.isTrue(st.toString().contains("main"));
28 } 28 }
29 } 29 }
OLDNEW
« no previous file with comments | « tests/standalone_2/bytedata_test.dart ('k') | tests/standalone_2/dart_developer_disabled_env_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698