Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Unified Diff: pkg/analysis_server/test/reflective_tests.dart

Issue 725143004: Format and sort analyzer and analysis_server packages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
+}
« no previous file with comments | « pkg/analysis_server/test/protocol_test.dart ('k') | pkg/analysis_server/test/search/member_declarations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698