testAnalyzeAndRun method

  1. @visibleForTesting
Future<List<PrioritizedSourceChange>> testAnalyzeAndRun(
  1. File file,
  2. AnalysisError analysisError,
  3. List<AnalysisError> others
)

Analyze a Dart file and runs this fix in test mode.

The result will contain all the changes that would have been applied by run.

Implementation

@visibleForTesting
Future<List<PrioritizedSourceChange>> testAnalyzeAndRun(
  File file,
  AnalysisError analysisError,
  List<AnalysisError> others,
) async {
  final result = await resolveFile2(path: file.path);
  result as ResolvedUnitResult;
  return testRun(result, analysisError, others);
}