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 /** | 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 */ | 198 */ |
199 String _currentGroup = ''; | 199 String _currentGroup = ''; |
200 | 200 |
201 /** Separator used between group names and test names. */ | 201 /** Separator used between group names and test names. */ |
202 String groupSep = ' '; | 202 String groupSep = ' '; |
203 | 203 |
204 /** Tests executed in this suite. */ | 204 /** Tests executed in this suite. */ |
205 final List<TestCase> _testCases = new List<TestCase>(); | 205 final List<TestCase> _testCases = new List<TestCase>(); |
206 | 206 |
207 /** Get the list of tests. */ | 207 /** Get the list of tests. */ |
208 final List<TestCase> testCases = new UnmodifiableListView(_testCases); | 208 final List<TestCase> testCases = _testCases; |
gram
2013/04/15 23:25:55
If the unmodifiable stuff (which KevMoo added) is
nweiz
2013/04/15 23:41:16
I've just made it a property, since it's final eit
| |
209 | 209 |
210 /** Setup function called before each test in a group */ | 210 /** Setup function called before each test in a group */ |
211 Function _testSetup; | 211 Function _testSetup; |
212 | 212 |
213 /** Teardown function called after each test in a group */ | 213 /** Teardown function called after each test in a group */ |
214 Function _testTeardown; | 214 Function _testTeardown; |
215 | 215 |
216 int _currentTestCaseIndex = 0; | 216 int _currentTestCaseIndex = 0; |
217 | 217 |
218 /** [TestCase] currently being executed. */ | 218 /** [TestCase] currently being executed. */ |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
857 } | 857 } |
858 | 858 |
859 /** Enable a test by ID. */ | 859 /** Enable a test by ID. */ |
860 void enableTest(int testId) => _setTestEnabledState(testId, true); | 860 void enableTest(int testId) => _setTestEnabledState(testId, true); |
861 | 861 |
862 /** Disable a test by ID. */ | 862 /** Disable a test by ID. */ |
863 void disableTest(int testId) => _setTestEnabledState(testId, false); | 863 void disableTest(int testId) => _setTestEnabledState(testId, false); |
864 | 864 |
865 /** Signature for a test function. */ | 865 /** Signature for a test function. */ |
866 typedef dynamic TestFunction(); | 866 typedef dynamic TestFunction(); |
OLD | NEW |