Skip to content

Commit b3cb533

Browse files
authored
Update comments (flutter#20)
1 parent 0a760d0 commit b3cb533

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.1.7
2+
3+
- Update documentation comments.
4+
- Remove `@MirrorsUsed` annotation on `dart:mirrors`.
5+
16
## 0.1.6
27

38
- Make `FailingTest` public, with the URI of the issue that causes

lib/test_reflective_loader.dart

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,18 @@
55
library test_reflective_loader;
66

77
import 'dart:async';
8-
@MirrorsUsed(metaTargets: 'ReflectiveTest')
98
import 'dart:mirrors';
109

1110
import 'package:test/test.dart' as test_package;
1211

1312
/**
14-
* A marker annotation used to annotate overridden test methods (so we cannot
15-
* rename them to `fail_`) which are expected to fail at `assert` in the
16-
* checked mode.
13+
* A marker annotation used to annotate test methods which are expected to fail
14+
* when asserts are enabled.
1715
*/
1816
const _AssertFailingTest assertFailingTest = const _AssertFailingTest();
1917

2018
/**
21-
* A marker annotation used to annotate overridden test methods (so we cannot
22-
* rename them to `fail_`) which are expected to fail.
19+
* A marker annotation used to annotate test methods which are expected to fail.
2320
*/
2421
const FailingTest failingTest = const FailingTest(null);
2522

@@ -267,10 +264,12 @@ Future _runTest(ClassMirror classMirror, Symbol symbol) {
267264
typedef dynamic _TestFunction();
268265

269266
/**
270-
* A marker annotation used to annotate overridden test methods (so we cannot
271-
* rename them to `fail_`) which are expected to fail.
267+
* A marker annotation used to annotate test methods which are expected to fail.
272268
*/
273269
class FailingTest {
270+
/**
271+
* Initialize this annotation with the given issue URI.
272+
*/
274273
const FailingTest(String issueUri);
275274
}
276275

@@ -279,15 +278,17 @@ class FailingTest {
279278
* information.
280279
*/
281280
class TestTimeout {
282-
final test_package.Timeout timeout;
281+
final test_package.Timeout _timeout;
283282

284-
const TestTimeout(this.timeout);
283+
/**
284+
* Initialize this annotation with the given timeout.
285+
*/
286+
const TestTimeout(test_package.Timeout timeout) : _timeout = timeout;
285287
}
286288

287289
/**
288-
* A marker annotation used to annotate overridden test methods (so we cannot
289-
* rename them to `fail_`) which are expected to fail at `assert` in the
290-
* checked mode.
290+
* A marker annotation used to annotate test methods which are expected to fail
291+
* when asserts are enabled.
291292
*/
292293
class _AssertFailingTest {
293294
const _AssertFailingTest();
@@ -309,7 +310,7 @@ class _Group {
309310
_TestFunction function) {
310311
String fullName = _combineNames(this.name, name);
311312
TestTimeout timeout = _getAnnotationInstance(memberMirror, TestTimeout);
312-
tests.add(new _Test(isSolo, fullName, function, timeout?.timeout));
313+
tests.add(new _Test(isSolo, fullName, function, timeout?._timeout));
313314
}
314315
}
315316

0 commit comments

Comments
 (0)