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

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

Issue 2686843003: Don't re-read files when compute their analysis results. (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/driver.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 809cbfdd22a64fd52a735b075dcbf94b1f2bf5a9..fc5f01a693cd820042a0d2552bb33c823d99f7b4 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -1401,10 +1401,7 @@ var B1 = A1;
// Update "a" so that "A1" is now "double".
// Get result for "a".
//
- // Even though we have not notified the driver about the change,
- // we still get "double" for "A1", because getResult() re-read the content.
- //
- // We also get "double" for "A2", even though "A2" has the type from "b".
+ // We get "double" for "A2", even though "A2" has the type from "b".
// That's because we check for "a" API signature consistency, and because
// it has changed, we invalidated the dependency cache, relinked libraries
// and recomputed types.
@@ -1415,6 +1412,8 @@ import 'b.dart';
var A1 = 1.2;
var A2 = B1;
''');
+ driver.changeFile(a);
+
{
AnalysisResult result = await driver.getResult(a);
expect(_getTopLevelVarType(result.unit, 'A1'), 'double');
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698