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; |
} |