Files
sdk/tests/standalone_2/io/issue_32052_test.dart
T
Zachary Anderson c8a8674d97 [dart:cli] Fix waitFor for Future that completes with null
fixes #32052

Change-Id: Id7a8b0da09c95436387eb57cc47b0b1489db0f0c
Reviewed-on: https://dart-review.googlesource.com/38924
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-02-06 15:43:33 +00:00

21 lines
544 B
Dart

// Copyright (c) 2018, 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 'dart:cli';
import 'package:async_helper/async_helper.dart';
import 'package:expect/expect.dart';
main() {
asyncStart();
Completer<Null> c = new Completer<Null>();
Timer.run(() {
c.complete(null);
asyncEnd();
});
Null result = waitFor<Null>(c.future);
Expect.isNull(result);
}