blob: 0790fb1f2095ff2e018c56221c8d8d82a6f23abf [file] [log] [blame]
// 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";
class Blah implements StackTrace {
toString() {
return "Blah " + _trace.toString();
var _trace;
foo() {
var x = "\nBloop\nBleep\n";
return new Future.error(42, new Blah(x));
main() async {
try {
var x = await foo();"Should not reach here.");
} on int catch (e, s) {
Expect.equals(42, e);
Expect.equals("Blah \nBloop\nBleep\n", s.toString());