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

Unified Diff: pkg/analyzer/test/src/task/test_support.dart

Issue 1120313004: Get memento objects from tasks, remember in cache and pass back to tasks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/analyzer/test/src/task/test_support.dart
diff --git a/pkg/analyzer/test/src/task/test_support.dart b/pkg/analyzer/test/src/task/test_support.dart
index 80cd7c3a4a2610ac88775644a04fa1d6816559af..7ac0d82266eac6ced9b47d30cb368575cc809449 100644
--- a/pkg/analyzer/test/src/task/test_support.dart
+++ b/pkg/analyzer/test/src/task/test_support.dart
@@ -23,6 +23,11 @@ class TestAnalysisTask extends AnalysisTask {
CaughtException exception;
/**
+ * The memento to associate with the result.
+ */
+ dynamic memento;
+
+ /**
* The results whose values are to be provided as outputs from this task.
*/
List<ResultDescriptor> results;
@@ -33,7 +38,8 @@ class TestAnalysisTask extends AnalysisTask {
int value;
TestAnalysisTask(AnalysisContext context, AnalysisTarget target,
- {this.descriptor, this.exception, this.results, this.value: 1})
+ {this.descriptor, this.exception, this.memento, this.results,
+ this.value: 1})
: super(context, target);
@override
@@ -47,10 +53,12 @@ class TestAnalysisTask extends AnalysisTask {
for (ResultDescriptor result in results) {
outputs[result] = value++;
}
+ outputMemento = memento;
} else if (descriptor != null) {
for (ResultDescriptor result in descriptor.results) {
outputs[result] = value++;
}
+ outputMemento = memento;
}
}
}
« pkg/analyzer/lib/src/task/driver.dart ('K') | « pkg/analyzer/test/src/task/model_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698