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

Side by Side Diff: pkg/scheduled_test/lib/scheduled_test.dart

Issue 12782016: Switch pkg packages, pub, and dartdoc to use package: imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 8 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 | Annotate | Revision Log
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 // TODO(nweiz): Add support for calling [schedule] while the schedule is already 5 // TODO(nweiz): Add support for calling [schedule] while the schedule is already
6 // running. 6 // running.
7 // TODO(nweiz): Port the non-Pub-specific scheduled test libraries from Pub. 7 // TODO(nweiz): Port the non-Pub-specific scheduled test libraries from Pub.
8 /// A package for writing readable tests of asynchronous behavior. 8 /// A package for writing readable tests of asynchronous behavior.
9 /// 9 ///
10 /// This package works by building up a queue of asynchronous tasks called a 10 /// This package works by building up a queue of asynchronous tasks called a
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 /// long as the [Schedule] knows your test is making some sort of progress, it 168 /// long as the [Schedule] knows your test is making some sort of progress, it
169 /// won't time out. 169 /// won't time out.
170 /// 170 ///
171 /// If a single task might take a long time, you can also manually tell the 171 /// If a single task might take a long time, you can also manually tell the
172 /// [Schedule] that it's making progress by calling [Schedule.heartbeat], which 172 /// [Schedule] that it's making progress by calling [Schedule.heartbeat], which
173 /// will reset the timeout whenever it's called. 173 /// will reset the timeout whenever it's called.
174 library scheduled_test; 174 library scheduled_test;
175 175
176 import 'dart:async'; 176 import 'dart:async';
177 177
178 import '../../../pkg/unittest/lib/unittest.dart' as unittest; 178 import 'package:unittest/unittest.dart' as unittest;
179 179
180 import 'src/schedule.dart'; 180 import 'src/schedule.dart';
181 import 'src/schedule_error.dart'; 181 import 'src/schedule_error.dart';
182 import 'src/utils.dart'; 182 import 'src/utils.dart';
183 183
184 export '../../../pkg/unittest/lib/matcher.dart' hide completes, completion; 184 export 'package:unittest/matcher.dart' hide completes, completion;
185 export '../../../pkg/unittest/lib/unittest.dart' show 185 export 'package:unittest/unittest.dart' show
186 config, configure, Configuration, logMessage, expectThrow; 186 config, configure, Configuration, logMessage, expectThrow;
187 187
188 export 'src/schedule.dart'; 188 export 'src/schedule.dart';
189 export 'src/schedule_error.dart'; 189 export 'src/schedule_error.dart';
190 export 'src/scheduled_future_matchers.dart'; 190 export 'src/scheduled_future_matchers.dart';
191 export 'src/task.dart'; 191 export 'src/task.dart';
192 192
193 /// The [Schedule] for the current test. This is used to add new tasks and 193 /// The [Schedule] for the current test. This is used to add new tasks and
194 /// inspect the state of the schedule. 194 /// inspect the state of the schedule.
195 /// 195 ///
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 /// [description] provides an optional description of the future, which is 337 /// [description] provides an optional description of the future, which is
338 /// used when generating error messages. 338 /// used when generating error messages.
339 Future wrapFuture(Future future, [String description]) { 339 Future wrapFuture(Future future, [String description]) {
340 if (currentSchedule == null) { 340 if (currentSchedule == null) {
341 throw new StateError("Unexpected call to wrapFuture with no current " 341 throw new StateError("Unexpected call to wrapFuture with no current "
342 "schedule."); 342 "schedule.");
343 } 343 }
344 344
345 return currentSchedule.wrapFuture(future, description); 345 return currentSchedule.wrapFuture(future, description);
346 } 346 }
OLDNEW
« no previous file with comments | « pkg/scheduled_test/lib/descriptor.dart ('k') | pkg/scheduled_test/lib/src/descriptor/directory_descriptor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698