| Index: frog/tests/await/src/TryCatch8Test.dart
|
| diff --git a/frog/tests/await/src/TryCatch8Test.dart b/frog/tests/await/src/TryCatch8Test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4959e506ce25d611946e2a891ced9e86239fbb44
|
| --- /dev/null
|
| +++ b/frog/tests/await/src/TryCatch8Test.dart
|
| @@ -0,0 +1,23 @@
|
| +// Copyright (c) 2011, 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.
|
| +
|
| +// Await within a try-catch block, the awaited future produces the error, the
|
| +// future is not normalized.
|
| +
|
| +#import("await_test_helper.dart");
|
| +
|
| +errorDuring() {
|
| + try {
|
| + final t = await errorOf("my error");
|
| + return t;
|
| + } catch (e) {
|
| + Expect.equals("my error", e);
|
| + return 2;
|
| + }
|
| +}
|
| +
|
| +main() {
|
| + int t = await errorDuring();
|
| + Expect.equals(2, t);
|
| +}
|
|
|