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")); |
+ } |
+} |