Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Update comments #20

Merged
merged 2 commits into from
Jul 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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