| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
| 8 | 8 |
| 9 import 'package:metatest/metatest.dart'; | |
| 10 import '../utils.dart'; | 9 import '../utils.dart'; |
| 11 | 10 |
| 12 void main() { | 11 void main() { |
| 13 expectTestFails("a top-leveled error should be converted to a schedule error", | 12 expectTestFails("a top-leveled error should be converted to a schedule error", |
| 14 () { | 13 () { |
| 15 schedule(() { | 14 schedule(() { |
| 16 new Future.microtask(() => throw 'error'); | 15 new Future.microtask(() => throw 'error'); |
| 17 return pumpEventQueue(); | 16 return pumpEventQueue(); |
| 18 }); | 17 }); |
| 19 }, (errors) { | 18 }, (errors) { |
| 20 expect(errors.first.error, equals('error')); | 19 expect(errors.first.error, equals('error')); |
| 21 }); | 20 }); |
| 22 } | 21 } |
| OLD | NEW |