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

Side by Side Diff: test/scheduled_test/current_schedule_errors_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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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';
6
7 import 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
8 6
9 import 'package:metatest/metatest.dart';
10 import '../utils.dart'; 7 import '../utils.dart';
11 8
12 void main() { 9 void main() {
13 setUpMockClock(); 10 setUpMockClock();
14 11
15 expectTestFailure('currentSchedule.errors contains the error in the ' 12 expectTestFailure('currentSchedule.errors contains the error in the '
16 'onComplete queue', () { 13 'onComplete queue', () {
17 throw 'error'; 14 throw 'error';
18 }, (error) => expect(error, equals('error'))); 15 }, (error) => expect(error, equals('error')));
19 16
(...skipping 17 matching lines...) Expand all
37 mockClock.run(); 34 mockClock.run();
38 35
39 sleep(1).then(expectAsync((_) { 36 sleep(1).then(expectAsync((_) {
40 throw 'error1'; 37 throw 'error1';
41 })); 38 }));
42 sleep(2).then(expectAsync((_) { 39 sleep(2).then(expectAsync((_) {
43 throw 'error2'; 40 throw 'error2';
44 })); 41 }));
45 }, (error) => expect(error, equals('error1'))); 42 }, (error) => expect(error, equals('error1')));
46 } 43 }
OLDNEW
« no previous file with comments | « test/scheduled_test/current_schedule_current_task_test.dart ('k') | test/scheduled_test/nested_task_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698