| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /** | 5 /** |
| 6 * A library for writing dart unit tests. | 6 * A library for writing dart unit tests. |
| 7 * | 7 * |
| 8 * To import this library, specify the relative path to | 8 * To import this library, specify the relative path to |
| 9 * pkg/unittest/unittest.dart. | 9 * pkg/unittest/unittest.dart. |
| 10 * | 10 * |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 * Set the [Configuration] used by the unittest library. Returns any | 162 * Set the [Configuration] used by the unittest library. Returns any |
| 163 * previous configuration. | 163 * previous configuration. |
| 164 * TODO: consider deprecating in favor of a setter now we have a getter. | 164 * TODO: consider deprecating in favor of a setter now we have a getter. |
| 165 */ | 165 */ |
| 166 Configuration configure(Configuration config) { | 166 Configuration configure(Configuration config) { |
| 167 Configuration _oldConfig = _config; | 167 Configuration _oldConfig = _config; |
| 168 _config = config; | 168 _config = config; |
| 169 return _oldConfig; | 169 return _oldConfig; |
| 170 } | 170 } |
| 171 | 171 |
| 172 void logMessage(String message) => _config.log(message); | 172 void logMessage(String message) => _config.logMessage(message); |
| 173 | 173 |
| 174 /** | 174 /** |
| 175 * Description text of the current test group. If multiple groups are nested, | 175 * Description text of the current test group. If multiple groups are nested, |
| 176 * this will contain all of their text concatenated. | 176 * this will contain all of their text concatenated. |
| 177 */ | 177 */ |
| 178 String _currentGroup = ''; | 178 String _currentGroup = ''; |
| 179 | 179 |
| 180 /** Separator used between group names and test names. */ | 180 /** Separator used between group names and test names. */ |
| 181 String groupSep = ' '; | 181 String groupSep = ' '; |
| 182 | 182 |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 } | 864 } |
| 865 | 865 |
| 866 /** Enable a test by ID. */ | 866 /** Enable a test by ID. */ |
| 867 void enableTest(int testId) => _setTestEnabledState(testId, true); | 867 void enableTest(int testId) => _setTestEnabledState(testId, true); |
| 868 | 868 |
| 869 /** Disable a test by ID. */ | 869 /** Disable a test by ID. */ |
| 870 void disableTest(int testId) => _setTestEnabledState(testId, false); | 870 void disableTest(int testId) => _setTestEnabledState(testId, false); |
| 871 | 871 |
| 872 /** Signature for a test function. */ | 872 /** Signature for a test function. */ |
| 873 typedef void TestFunction(); | 873 typedef void TestFunction(); |
| OLD | NEW |