Remove a duplication of analysis from some tests

Change-Id: Ib358b943519172afaf32ba9185ebec96c57beeda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2020-11-10 19:15:26 +00:00 committed by commit-bot@chromium.org
parent c15faeab88
commit d7b3812f51

View file

@ -61,10 +61,7 @@ class StatementCompletionTest extends AbstractSingleUnitTest {
}
Future<void> _computeCompletion(int offset) async {
// TODO(brianwilkerson) I'm fairly confident that `result` is equivalent to
// `testAnalysisResult` and that we're resolving the file twice.
var result = await session.getResolvedUnit(testFile);
var context = StatementCompletionContext(result, offset);
var context = StatementCompletionContext(testAnalysisResult, offset);
var processor = StatementCompletionProcessor(context);
var completion = await processor.compute();
change = completion.change;