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

Unified Diff: pkg/analyzer/test/src/dart/analysis/driver_test.dart

Issue 2691433008: AnalysisDriver.getUnitElement() should return a structure with a key. (Closed)
Patch Set: Created 3 years, 10 months 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/search.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/dart/analysis/driver_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index fc5f01a693cd820042a0d2552bb33c823d99f7b4..2a7aa90d71226a439bffc12f52d442e3e982aff0 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -1540,8 +1540,9 @@ main() {
''';
addTestFile(content);
- CompilationUnitElement unitElement = await driver.getUnitElement(testFile);
- expect(unitElement, isNotNull);
+ UnitElementResult unitResult = await driver.getUnitElement(testFile);
+ expect(unitResult, isNotNull);
+ CompilationUnitElement unitElement = unitResult.element;
expect(unitElement.source.fullName, testFile);
expect(unitElement.functions.map((c) => c.name),
unorderedEquals(['foo', 'main']));
@@ -1550,9 +1551,9 @@ main() {
test_getUnitElement_notDart() async {
var path = _p('/test.txt');
provider.newFile(path, 'class A {}');
- CompilationUnitElement unit = await driver.getUnitElement(path);
- expect(unit, isNotNull);
- expect(unit.types.map((e) => e.name), ['A']);
+ UnitElementResult unitResult = await driver.getUnitElement(path);
+ expect(unitResult, isNotNull);
+ expect(unitResult.element.types.map((e) => e.name), ['A']);
}
test_hasFilesToAnalyze() async {
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/search.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698