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

Side by Side Diff: test/scheduled_test/out_of_band_task_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 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 6
7 import 'package:metatest/metatest.dart';
8 import '../utils.dart'; 7 import '../utils.dart';
9 8
10 void main() { 9 void main() {
11 setUpMockClock(); 10 setUpMockClock();
12 11
13 expectTestPasses("out-of-band schedule() runs its function immediately (but " 12 expectTestPasses("out-of-band schedule() runs its function immediately (but "
14 "asynchronously)", () { 13 "asynchronously)", () {
15 mockClock.run(); 14 mockClock.run();
16 schedule(() { 15 schedule(() {
17 expect(sleep(1).then((_) { 16 expect(sleep(1).then((_) {
(...skipping 14 matching lines...) Expand all
32 var scheduleRun = false; 31 var scheduleRun = false;
33 expect(sleep(1).then((_) { 32 expect(sleep(1).then((_) {
34 schedule(() => sleep(1).then((_) { 33 schedule(() => sleep(1).then((_) {
35 scheduleRun = true; 34 scheduleRun = true;
36 })); 35 }));
37 }), completes); 36 }), completes);
38 37
39 currentSchedule.onComplete.schedule(() => expect(scheduleRun, isTrue)); 38 currentSchedule.onComplete.schedule(() => expect(scheduleRun, isTrue));
40 }); 39 });
41 } 40 }
OLDNEW
« no previous file with comments | « test/scheduled_test/nested_task_test.dart ('k') | test/scheduled_test/unhandled_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698