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

Unified Diff: pkg/analyzer/test/utils.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/analyzer/test/utils.dart
diff --git a/pkg/analyzer/test/utils.dart b/pkg/analyzer/test/utils.dart
index be7e64dd95429e86da3ff8fe7c863eae70b3384e..9514c4fb92e6e4abda79279b8e4222d0960fdf6a 100644
--- a/pkg/analyzer/test/utils.dart
+++ b/pkg/analyzer/test/utils.dart
@@ -5,9 +5,11 @@
library analyzer.test.utils;
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
+import 'package:front_end/src/base/source.dart';
import 'package:test/test.dart';
/**
@@ -45,7 +47,8 @@ class AstFinder {
return unitMember;
}
}
- fail('No class named $className in ${unit.element.source}');
+ Source source = resolutionMap.elementForCompilationUnit(unit).source;
+ fail('No class named $className in $source');
return null;
}

Powered by Google App Engine
This is Rietveld 408576698