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

Side by Side Diff: dart/pkg/unittest/lib/src/configuration.dart

Issue 23702020: Add timeout getter to Configuration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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 part of unittest; 5 part of unittest;
6 6
7 /** 7 /**
8 * Describes the interface used by the unit test system for communicating the 8 * Describes the interface used by the unit test system for communicating the
9 * results of a test run. 9 * results of a test run.
10 */ 10 */
(...skipping 10 matching lines...) Expand all
21 * For use by subclasses which wish to implement only a subset of features. 21 * For use by subclasses which wish to implement only a subset of features.
22 */ 22 */
23 Configuration.blank(); 23 Configuration.blank();
24 24
25 /** 25 /**
26 * If [true], tests are started automatically. Otherwise [runTests] 26 * If [true], tests are started automatically. Otherwise [runTests]
27 * must be called explicitly after tests are set up. 27 * must be called explicitly after tests are set up.
28 */ 28 */
29 bool get autoStart => true; 29 bool get autoStart => true;
30 30
31 /// How long a [TestCase] can run before it is considered an error.
32 Duration get timeout => const Duration(seconds: 20);
33
31 /** 34 /**
32 * Called as soon as the unittest framework becomes initialized. This is done 35 * Called as soon as the unittest framework becomes initialized. This is done
33 * even before tests are added to the test framework. It might be used to 36 * even before tests are added to the test framework. It might be used to
34 * determine/debug errors that occur before the test harness starts executing. 37 * determine/debug errors that occur before the test harness starts executing.
35 * It is also used to tell the vm or browser that tests are going to be run 38 * It is also used to tell the vm or browser that tests are going to be run
36 * asynchronously and that the process should wait until they are done. 39 * asynchronously and that the process should wait until they are done.
37 */ 40 */
38 void onInit() {} 41 void onInit() {}
39 42
40 /** Called as soon as the unittest framework starts running. */ 43 /** Called as soon as the unittest framework starts running. */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 * Called with the result of all test cases. Browser tests commonly override 77 * Called with the result of all test cases. Browser tests commonly override
75 * this to reformat the output. 78 * this to reformat the output.
76 * 79 *
77 * When [uncaughtError] is not null, it contains an error that occured outside 80 * When [uncaughtError] is not null, it contains an error that occured outside
78 * of tests (e.g. setting up the test). 81 * of tests (e.g. setting up the test).
79 */ 82 */
80 void onSummary(int passed, int failed, int errors, List<TestCase> results, 83 void onSummary(int passed, int failed, int errors, List<TestCase> results,
81 String uncaughtError) {} 84 String uncaughtError) {}
82 } 85 }
83 86
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