Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: test/scheduled_test/unhandled_error_test.dart

Issue 1152453009: pkg/scheduled_test: fix analyzer hints (Closed) Base URL: https://github.com/dart-lang/scheduled_test.git@master
Patch Set: nits Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/scheduled_test/out_of_band_task_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « test/scheduled_test/out_of_band_task_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698