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

Unified Diff: tests/standalone/causal_async_stack_test.dart

Issue 2944483002: Allow enabling --causal-async-stacks in AOT. (Closed)
Patch Set: . Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flag_list.h ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/causal_async_stack_test.dart
diff --git a/tests/standalone/causal_async_stack_test.dart b/tests/standalone/causal_async_stack_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..faebf3e0e6a5f0e666e3f7fb676557d618069951
--- /dev/null
+++ b/tests/standalone/causal_async_stack_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--causal_async_stacks
+
+import "package:expect/expect.dart";
+
+baz() async {
+ throw "Bad!";
+}
+
+bar() async {
+ await baz();
+}
+
+foo() async {
+ await bar();
+}
+
+main() async {
+ try {
+ await foo();
+ } catch (e, st) {
+ Expect.isTrue(st.toString().contains("baz"));
+ Expect.isTrue(st.toString().contains("bar"));
+ Expect.isTrue(st.toString().contains("foo"));
+ Expect.isTrue(st.toString().contains("main"));
+ }
+}
« no previous file with comments | « runtime/vm/flag_list.h ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698