dart-sdk/tests/language/regress_23500_test.dart
Jacob Richman 3c7353d987 Update all tests
Support //# multitests for better dartfmt compatibility and fewer multitest false positives

All files under tests were manually updated with

find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'

For now both old and new styles are allowed to accommodate CO19 tests.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2765693002 .
2017-03-21 12:39:28 -07:00

30 lines
618 B
Dart

// Copyright (c) 2015, 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.
import "dart:async";
import "package:expect/expect.dart";
foo() async {
try {
try {
await for (var c in new Stream.fromIterable([])) {} // //# 01: ok
await 0; // //# 02: ok
} catch (error) {
}
} catch (error) {
}
throw "error";
}
main() async {
var error = "no error";
try {
await foo();
} catch (e) {
error = e;
}
Expect.equals("error", error);
}