Files
sdk/tests/lib_2/async/stack_trace13_test.dart
T
William Hesse 93f255db7d Migrated test block 172
Author: bkonyi@google.com

Migrated test block 172 to Dart 2.0 and rolled forward package:test to 0.12.24+2 to fix issues with testing streams.

Migrated stream_controller_async from unittest->test.

This is a duplicate copy of CL https://dart-review.googlesource.com/c/sdk/+/3685/ rebased, with merge conflict resolved.
Bug:
Change-Id: I56e8ef24c74dfccbda10800541d6916053d8c931
Reviewed-on: https://dart-review.googlesource.com/4621
Reviewed-by: William Hesse <whesse@google.com>
2017-09-09 00:18:53 +00:00

23 lines
579 B
Dart

// Copyright (c) 2013, 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 'package:expect/expect.dart';
import 'package:async_helper/async_helper.dart';
import 'dart:async';
main() {
StackTrace trace;
asyncStart();
var f = new Future(() {
throw "foo";
});
f.then((_) => 499).then((_) {
throw "Unreachable";
}, onError: (e, st) {
Expect.equals("foo", e);
Expect.isNotNull(st);
asyncEnd();
});
}