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

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

Issue 23654008: Stop working around issue 9535. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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) 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 /// ## Installing ## 10 /// ## Installing ##
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 library scheduled_test; 190 library scheduled_test;
191 191
192 import 'dart:async'; 192 import 'dart:async';
193 193
194 import 'package:unittest/unittest.dart' as unittest; 194 import 'package:unittest/unittest.dart' as unittest;
195 195
196 import 'src/schedule.dart'; 196 import 'src/schedule.dart';
197 import 'src/schedule_error.dart'; 197 import 'src/schedule_error.dart';
198 198
199 export 'package:unittest/unittest.dart' hide 199 export 'package:unittest/unittest.dart' hide
200 test, solo_test, group, setUp, tearDown, unittestConfiguration, 200 test, solo_test, group, setUp, tearDown, completes, completion;
201 currentTestCase, completes, completion;
202 201
203 export 'src/schedule.dart'; 202 export 'src/schedule.dart';
204 export 'src/schedule_error.dart'; 203 export 'src/schedule_error.dart';
205 export 'src/scheduled_future_matchers.dart'; 204 export 'src/scheduled_future_matchers.dart';
206 export 'src/task.dart'; 205 export 'src/task.dart';
207 206
208 /// The [Schedule] for the current test. This is used to add new tasks and 207 /// The [Schedule] for the current test. This is used to add new tasks and
209 /// inspect the state of the schedule. 208 /// inspect the state of the schedule.
210 /// 209 ///
211 /// This is `null` when there's no test currently running. 210 /// This is `null` when there's no test currently running.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 /// [description] provides an optional description of the future, which is 368 /// [description] provides an optional description of the future, which is
370 /// used when generating error messages. 369 /// used when generating error messages.
371 Future wrapFuture(Future future, [String description]) { 370 Future wrapFuture(Future future, [String description]) {
372 if (currentSchedule == null) { 371 if (currentSchedule == null) {
373 throw new StateError("Unexpected call to wrapFuture with no current " 372 throw new StateError("Unexpected call to wrapFuture with no current "
374 "schedule."); 373 "schedule.");
375 } 374 }
376 375
377 return currentSchedule.wrapFuture(future, description); 376 return currentSchedule.wrapFuture(future, description);
378 } 377 }
379
380 // TODO(nweiz): re-export these once issue 9535 is fixed.
381 unittest.Configuration get unittestConfiguration =>
382 unittest.unittestConfiguration;
383 void set unittestConfiguration(unittest.Configuration value) {
384 unittest.unittestConfiguration = value;
385 }
386
387 // TODO(nweiz): re-export these once issue 9535 is fixed.
388 unittest.TestCase get currentTestCase => unittest.currentTestCase;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698