Skip to content

Commit

Permalink
Update comments (flutter#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
scheglov authored Jul 21, 2018
1 parent 0a760d0 commit b3cb533
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.7

- Update documentation comments.
- Remove `@MirrorsUsed` annotation on `dart:mirrors`.

## 0.1.6

- Make `FailingTest` public, with the URI of the issue that causes
Expand Down
29 changes: 15 additions & 14 deletions lib/test_reflective_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
library test_reflective_loader;

import 'dart:async';
@MirrorsUsed(metaTargets: 'ReflectiveTest')
import 'dart:mirrors';

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

/**
* A marker annotation used to annotate overridden test methods (so we cannot
* rename them to `fail_`) which are expected to fail at `assert` in the
* checked mode.
* A marker annotation used to annotate test methods which are expected to fail
* when asserts are enabled.
*/
const _AssertFailingTest assertFailingTest = const _AssertFailingTest();

/**
* A marker annotation used to annotate overridden test methods (so we cannot
* rename them to `fail_`) which are expected to fail.
* A marker annotation used to annotate test methods which are expected to fail.
*/
const FailingTest failingTest = const FailingTest(null);

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

/**
* A marker annotation used to annotate overridden test methods (so we cannot
* rename them to `fail_`) which are expected to fail.
* A marker annotation used to annotate test methods which are expected to fail.
*/
class FailingTest {
/**
* Initialize this annotation with the given issue URI.
*/
const FailingTest(String issueUri);
}

Expand All @@ -279,15 +278,17 @@ class FailingTest {
* information.
*/
class TestTimeout {
final test_package.Timeout timeout;
final test_package.Timeout _timeout;

const TestTimeout(this.timeout);
/**
* Initialize this annotation with the given timeout.
*/
const TestTimeout(test_package.Timeout timeout) : _timeout = timeout;
}

/**
* A marker annotation used to annotate overridden test methods (so we cannot
* rename them to `fail_`) which are expected to fail at `assert` in the
* checked mode.
* A marker annotation used to annotate test methods which are expected to fail
* when asserts are enabled.
*/
class _AssertFailingTest {
const _AssertFailingTest();
Expand All @@ -309,7 +310,7 @@ class _Group {
_TestFunction function) {
String fullName = _combineNames(this.name, name);
TestTimeout timeout = _getAnnotationInstance(memberMirror, TestTimeout);
tests.add(new _Test(isSolo, fullName, function, timeout?.timeout));
tests.add(new _Test(isSolo, fullName, function, timeout?._timeout));
}
}

Expand Down

0 comments on commit b3cb533

Please sign in to comment.