| OLD | NEW |
| (Empty) | |
| 1 import "dart:async"; |
| 2 import "package:expect/expect.dart"; |
| 3 |
| 4 class Blah extends StackTrace { |
| 5 Blah(this._trace); |
| 6 |
| 7 toString() { |
| 8 return "Blah " + _trace.toString(); |
| 9 } |
| 10 |
| 11 var _trace; |
| 12 } |
| 13 |
| 14 foo() { |
| 15 var x = "\nBloop\nBleep\n"; |
| 16 return new Future.error(42, new Blah(x)); |
| 17 } |
| 18 |
| 19 main() async { |
| 20 try { |
| 21 var x = await foo(); |
| 22 Expect.fail("Should not reach here."); |
| 23 } on int catch (e, s) { |
| 24 Expect.equals(42, e); |
| 25 Expect.equals("Blah \nBloop\nBleep\n", s.toString()); |
| 26 return; |
| 27 } |
| 28 Expect.fail("Unreachable."); |
| 29 } |
| OLD | NEW |