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

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

Issue 13130005: Remove throw from unittest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | tests/html/audiobuffersourcenode_test.dart » ('j') | 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 /** 5 /**
6 * A library for writing dart unit tests. 6 * A library for writing dart unit tests.
7 * 7 *
8 * To import this library, install the 8 * To import this library, install the
9 * [unittest package](http://pub.dartlang.org/packages/unittest) via the pub 9 * [unittest package](http://pub.dartlang.org/packages/unittest) via the pub
10 * package manager. See the [Getting Started](http://pub.dartlang.org/doc) 10 * package manager. See the [Getting Started](http://pub.dartlang.org/doc)
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 /** [Configuration] used by the unittest library. */ 170 /** [Configuration] used by the unittest library. */
171 Configuration get unittestConfiguration => _config; 171 Configuration get unittestConfiguration => _config;
172 172
173 /** 173 /**
174 * Sets the [Configuration] used by the unittest library. 174 * Sets the [Configuration] used by the unittest library.
175 * 175 *
176 * Throws a [StateError] if there is an existing, incompatible value. 176 * Throws a [StateError] if there is an existing, incompatible value.
177 */ 177 */
178 void set unittestConfiguration(Configuration value) { 178 void set unittestConfiguration(Configuration value) {
179 if(!identical(_config, value)) { 179 _config = value;
180 if(_config != null) {
181 throw new StateError('unittestConfiguration has already been set');
182 }
183 _config = value;
184 }
185 } 180 }
186 181
187 void logMessage(String message) => _config.logMessage(message); 182 void logMessage(String message) => _config.logMessage(message);
188 183
189 /** 184 /**
190 * Description text of the current test group. If multiple groups are nested, 185 * Description text of the current test group. If multiple groups are nested,
191 * this will contain all of their text concatenated. 186 * this will contain all of their text concatenated.
192 */ 187 */
193 String _currentGroup = ''; 188 String _currentGroup = '';
194 189
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 } 842 }
848 843
849 /** Enable a test by ID. */ 844 /** Enable a test by ID. */
850 void enableTest(int testId) => _setTestEnabledState(testId, true); 845 void enableTest(int testId) => _setTestEnabledState(testId, true);
851 846
852 /** Disable a test by ID. */ 847 /** Disable a test by ID. */
853 void disableTest(int testId) => _setTestEnabledState(testId, false); 848 void disableTest(int testId) => _setTestEnabledState(testId, false);
854 849
855 /** Signature for a test function. */ 850 /** Signature for a test function. */
856 typedef dynamic TestFunction(); 851 typedef dynamic TestFunction();
OLDNEW
« no previous file with comments | « no previous file | tests/html/audiobuffersourcenode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698