Index: pkg/analysis_server/test/reflective_tests.dart |
diff --git a/pkg/analysis_server/test/reflective_tests.dart b/pkg/analysis_server/test/reflective_tests.dart |
index 202a0be0532853fc00876f8b2845bc2da3b792db..685bd130982a3aac5c83a5f12f1b4de33fb252b1 100644 |
--- a/pkg/analysis_server/test/reflective_tests.dart |
+++ b/pkg/analysis_server/test/reflective_tests.dart |
@@ -4,24 +4,14 @@ |
library reflective_tests; |
-import 'dart:async'; |
- |
@MirrorsUsed(metaTargets: 'ReflectiveTestCase') |
import 'dart:mirrors'; |
+import 'dart:async'; |
import 'package:unittest/unittest.dart'; |
/** |
- * A marker annotation used to instruct dart2js to keep reflection information |
- * for the annotated classes. |
- */ |
-class ReflectiveTestCase { |
- const ReflectiveTestCase(); |
-} |
- |
- |
-/** |
* Runs test methods existing in the given [type]. |
* |
* Methods with names starting with `test` are run using [test] function. |
@@ -67,14 +57,6 @@ void runReflectiveTests(Type type) { |
} |
-_runTest(ClassMirror classMirror, Symbol symbol) { |
- InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); |
- return _invokeSymbolIfExists(instanceMirror, #setUp).then( |
- (_) => instanceMirror.invoke(symbol, []).reflectee).whenComplete( |
- () => _invokeSymbolIfExists(instanceMirror, #tearDown)); |
-} |
- |
- |
Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { |
var invocationResult = null; |
try { |
@@ -87,3 +69,26 @@ Future _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { |
return new Future.value(invocationResult); |
} |
} |
+ |
+ |
+_runTest(ClassMirror classMirror, Symbol symbol) { |
+ InstanceMirror instanceMirror = classMirror.newInstance(new Symbol(''), []); |
+ return _invokeSymbolIfExists( |
+ instanceMirror, |
+ #setUp).then( |
+ (_) => |
+ instanceMirror.invoke( |
+ symbol, |
+ [ |
+ ]).reflectee).whenComplete( |
+ () => _invokeSymbolIfExists(instanceMirror, #tearDown)); |
+} |
+ |
+ |
+/** |
+ * A marker annotation used to instruct dart2js to keep reflection information |
+ * for the annotated classes. |
+ */ |
+class ReflectiveTestCase { |
+ const ReflectiveTestCase(); |
+} |