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

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

Issue 849863002: Replace @ReflectiveTestCase() with @reflectiveTest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months 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 27306800c028c80afbaf06f0798d2cf9c91b110d..80c9073be80c226297324fab54b635e8b20d7af2 100644
--- a/pkg/analysis_server/test/reflective_tests.dart
+++ b/pkg/analysis_server/test/reflective_tests.dart
@@ -4,7 +4,7 @@
library reflective_tests;
-@MirrorsUsed(metaTargets: 'ReflectiveTestCase')
+@MirrorsUsed(metaTargets: 'ReflectiveTest')
import 'dart:mirrors';
import 'dart:async';
@@ -31,10 +31,10 @@ void runReflectiveTests(Type type) {
ClassMirror classMirror = reflectClass(type);
if (!classMirror.metadata.any(
(InstanceMirror annotation) =>
- annotation.type.reflectedType == ReflectiveTestCase)) {
+ annotation.type.reflectedType == ReflectiveTest)) {
String name = MirrorSystem.getName(classMirror.qualifiedName);
throw new Exception(
- 'Class $name must have annotation "@ReflectiveTestCase()" '
+ 'Class $name must have annotation "@reflectiveTest" '
'in order to be run by runReflectiveTests.');
}
String className = MirrorSystem.getName(classMirror.simpleName);
@@ -124,6 +124,12 @@ _runTest(ClassMirror classMirror, Symbol symbol) {
* A marker annotation used to instruct dart2js to keep reflection information
* for the annotated classes.
*/
-class ReflectiveTestCase {
- const ReflectiveTestCase();
+class ReflectiveTest {
+ const ReflectiveTest();
}
+
+/**
+ * A marker annotation used to instruct dart2js to keep reflection information
+ * for the annotated classes.
+ */
+const ReflectiveTest reflectiveTest = const ReflectiveTest();

Powered by Google App Engine
This is Rietveld 408576698