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

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
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..4d98a2f6c4d01fbe2d642f9fcc2c1faee3c87672
--- /dev/null
+++ b/tests/standalone/causal_async_stack_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
siva 2017/06/15 18:03:25 2017
rmacnak 2017/06/15 18:09:19 Done.
+// 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.
+// Dart test program for testing throw statement
+// 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"));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698