| Index: tests/language/asyncstar_concat_test.dart
|
| diff --git a/tests/language/await_not_started_immediately_test.dart b/tests/language/asyncstar_concat_test.dart
|
| similarity index 50%
|
| copy from tests/language/await_not_started_immediately_test.dart
|
| copy to tests/language/asyncstar_concat_test.dart
|
| index 035885e09c23480054e0dcf5c31ff63ca3a35963..aeb1361cd85fdcc35bf1fd466b161c2462befc4e 100644
|
| --- a/tests/language/await_not_started_immediately_test.dart
|
| +++ b/tests/language/asyncstar_concat_test.dart
|
| @@ -2,21 +2,28 @@
|
| // 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.
|
|
|
| -// Test that an async function does not start immediately.
|
| -
|
| import "package:expect/expect.dart";
|
| import "package:async_helper/async_helper.dart";
|
|
|
| -var x = 0;
|
| +range(start, end) async* {
|
| + for (int i = start; i < end; i++) {
|
| + yield i;
|
| + }
|
| +}
|
| +
|
| +concat(a, b) async* {
|
| + yield* a;
|
| + yield* b;
|
| +}
|
|
|
| -foo() async {
|
| - x++;
|
| - await 1;
|
| - x++;
|
| +test() async {
|
| + Expect.listEquals([1, 2, 3, 11, 12, 13],
|
| + await concat(range(1, 4), range(11, 14)).toList());
|
| }
|
|
|
| -void main() {
|
| +main() {
|
| asyncStart();
|
| - foo().then((_) => Expect.equals(2, x)).whenComplete(asyncEnd);
|
| - Expect.equals(0, x);
|
| + test().then((_) {
|
| + asyncEnd();
|
| + });
|
| }
|
|
|