| Index: frog/tests/await/src/TryCatchNegativeTest.dart
|
| diff --git a/frog/tests/await/src/TryCatchNegativeTest.dart b/frog/tests/await/src/TryCatchNegativeTest.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1774e66b8c1a355c85f8a9ae8c233b06254a6d15
|
| --- /dev/null
|
| +++ b/frog/tests/await/src/TryCatchNegativeTest.dart
|
| @@ -0,0 +1,21 @@
|
| +// 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, no error occurs.
|
| +
|
| +#import("await_test_helper.dart");
|
| +
|
| +noerror() {
|
| + try {
|
| + final t = await futureOf(0);
|
| + return t;
|
| + } catch (e) {
|
| + return -1;
|
| + }
|
| +}
|
| +
|
| +main() {
|
| + int t = await noerror();
|
| + Expect.notEquals(0, t);
|
| +}
|
|
|