// 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.

/// @assertion Future done
/// Return a future which is completed when the StreamSink is finished.
///
/// If the StreamSink fails with an error, perhaps in response to adding events
/// using add, addError or close, the done future will complete with that error.
///
/// Otherwise, the returned future will complete when either:
///  - all events have been processed and the sink has been closed, or
///  - the sink has otherwise been stopped from handling more events (for
///    example by cancelling a stream subscription).
///
/// @description Checks that if synchronous methods resulted in an error,
/// while there was no active future, the done future completes with that error.
/// @author ilya

import "dart:async";

main() {
  var c = new StreamController();

  c.done
    .then((x) {
      print('completed with value $x');
    })
    .catchError((x) {
      print('completed with error $x');
    });

  c.addError(1);

  c.stream.listen(null, onError: (_) {});

  c.close()
    .then((x) {
      print('completed with value $x');
    })
    .catchError((x) {
      print('completed with error $x');
    });
}
