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

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

Issue 742273005: Annotate remaining analyzer/analysis server tests with "@ReflectiveTestCase()" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « pkg/analyzer/test/generated/static_warning_code_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/reflective_tests.dart
diff --git a/pkg/analyzer/test/reflective_tests.dart b/pkg/analyzer/test/reflective_tests.dart
index f03f9762ef8ba38e9ce2543d80286e7f02009c83..27306800c028c80afbaf06f0798d2cf9c91b110d 100644
--- a/pkg/analyzer/test/reflective_tests.dart
+++ b/pkg/analyzer/test/reflective_tests.dart
@@ -29,6 +29,14 @@ import 'package:unittest/unittest.dart';
*/
void runReflectiveTests(Type type) {
ClassMirror classMirror = reflectClass(type);
+ if (!classMirror.metadata.any(
+ (InstanceMirror annotation) =>
+ annotation.type.reflectedType == ReflectiveTestCase)) {
+ String name = MirrorSystem.getName(classMirror.qualifiedName);
+ throw new Exception(
+ 'Class $name must have annotation "@ReflectiveTestCase()" '
+ 'in order to be run by runReflectiveTests.');
+ }
String className = MirrorSystem.getName(classMirror.simpleName);
group(className, () {
classMirror.instanceMembers.forEach((symbol, memberMirror) {
« no previous file with comments | « pkg/analyzer/test/generated/static_warning_code_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698