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

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

Issue 2053143003: When a test class is named SoloTest, run it using solo_group(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | 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 478877600f628b613100a3c0b449d3f459131eca..b8e5d0a7ae77acc35c20415f562ef4b0647085b4 100644
--- a/pkg/analyzer/test/reflective_tests.dart
+++ b/pkg/analyzer/test/reflective_tests.dart
@@ -65,8 +65,7 @@ void runReflectiveTests(Type type) {
throw new Exception('Class $name must have annotation "@reflectiveTest" '
'in order to be run by runReflectiveTests.');
}
- String className = MirrorSystem.getName(classMirror.simpleName);
- group(className, () {
+ void runMembers() {
classMirror.instanceMembers
.forEach((Symbol symbol, MethodMirror memberMirror) {
// we need only methods
@@ -105,7 +104,13 @@ void runReflectiveTests(Type type) {
});
}
});
- });
+ }
+ String className = MirrorSystem.getName(classMirror.simpleName);
+ if (className.endsWith('SoloTest')) {
+ solo_group(className, runMembers);
+ } else {
+ group(className, runMembers);
+ }
}
bool _hasAnnotationInstance(DeclarationMirror declaration, instance) =>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698