55library test_reflective_loader;
66
77import 'dart:async' ;
8- @MirrorsUsed (metaTargets: 'ReflectiveTest' )
98import 'dart:mirrors' ;
109
1110import '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 */
1816const _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 */
2421const FailingTest failingTest = const FailingTest (null );
2522
@@ -267,10 +264,12 @@ Future _runTest(ClassMirror classMirror, Symbol symbol) {
267264typedef 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 */
273269class 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 */
281280class 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 */
292293class _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