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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Address review comments Created 4 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
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index 4ddbb782ce610483fce798180c5cca6b28f51bb0..31b62e136afb19e4efb2b68d247fb40bf81f1d23 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -12,6 +12,7 @@ import 'package:analysis_server/plugin/protocol/protocol.dart'
hide AnalysisError;
import 'package:analysis_server/src/services/correction/fix.dart';
import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_resolver.dart';
@@ -5303,7 +5304,10 @@ class LintFixTest extends BaseFixProcessorTest {
void findLint(String src, String lintCode, {int length: 1}) {
int errorOffset = src.indexOf('/*LINT*/');
resolveTestUnit(src.replaceAll('/*LINT*/', ''));
- error = new AnalysisError(testUnit.element.source, errorOffset, length,
+ error = new AnalysisError(
+ resolutionMap.elementForCompilationUnit(testUnit).source,
+ errorOffset,
+ length,
new LintCode(lintCode, '<ignored>'));
}

Powered by Google App Engine
This is Rietveld 408576698