OLD | NEW |
---|---|
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 13 matching lines...) Expand all Loading... | |
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. | 31 /// How long a [TestCase] can run before it is considered an error. |
32 /// A [timeout] value of [:null:] means that the limit is infinite. | 32 /// A [timeout] value of [:null:] means that the limit is infinite. |
33 Duration get timeout => const Duration(minutes: 2); | 33 Duration get timeout => const Duration(minutes: 2); |
34 void set timeout(Duration newTimeout) {} | |
Bob Nystrom
2013/12/11 21:54:19
Ditch the void.
Also, should the setter actually
| |
34 | 35 |
35 /** | 36 /** |
36 * Called as soon as the unittest framework becomes initialized. This is done | 37 * Called as soon as the unittest framework becomes initialized. This is done |
37 * even before tests are added to the test framework. It might be used to | 38 * even before tests are added to the test framework. It might be used to |
38 * determine/debug errors that occur before the test harness starts executing. | 39 * determine/debug errors that occur before the test harness starts executing. |
39 * It is also used to tell the vm or browser that tests are going to be run | 40 * It is also used to tell the vm or browser that tests are going to be run |
40 * asynchronously and that the process should wait until they are done. | 41 * asynchronously and that the process should wait until they are done. |
41 */ | 42 */ |
42 void onInit() {} | 43 void onInit() {} |
43 | 44 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 * Called with the result of all test cases. Browser tests commonly override | 79 * Called with the result of all test cases. Browser tests commonly override |
79 * this to reformat the output. | 80 * this to reformat the output. |
80 * | 81 * |
81 * When [uncaughtError] is not null, it contains an error that occured outside | 82 * When [uncaughtError] is not null, it contains an error that occured outside |
82 * of tests (e.g. setting up the test). | 83 * of tests (e.g. setting up the test). |
83 */ | 84 */ |
84 void onSummary(int passed, int failed, int errors, List<TestCase> results, | 85 void onSummary(int passed, int failed, int errors, List<TestCase> results, |
85 String uncaughtError) {} | 86 String uncaughtError) {} |
86 } | 87 } |
87 | 88 |
OLD | NEW |