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

Unified Diff: pkg/analyzer/test/src/context/context_test.dart

Issue 1220633003: Try incremental analysis before limiting invalidation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/test/generated/incremental_resolver_test.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/context/context_test.dart
diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
index 8fc654ab96042740eb4d456c41431d847be98607..787c1bb0c227e1d7168d52daa553a937343f66cf 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -1586,7 +1586,7 @@ void g() { f(null); }''');
_changeSource(source, "");
source.generateExceptionOnRead = true;
_analyzeAll_assertFinished();
- expect(source.readCount, 3);
+ expect(source.readCount, 5);
}
void test_performAnalysisTask_missingPart() {
@@ -2000,6 +2000,10 @@ class LimitedInvalidateTest extends AbstractContextTest {
void setUp() {
AnalysisEngine.instance.limitInvalidationInTaskModel = true;
super.setUp();
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.incremental = true;
+ context.analysisOptions = options;
}
@override
@@ -2163,6 +2167,33 @@ class C {}
expect(context.getErrors(sourceB).errors, hasLength(1));
}
+ void test_usedName_directUser_withIncremental() {
+ Source sourceA = addSource("/a.dart", r'''
+library lib_a;
+class A {
+ m() {}
+}
+''');
+ Source sourceB = addSource("/b.dart", r'''
+library lib_b;
+import 'a.dart';
+main() {
+ A a = new A();
+ a.m();
+}
+''');
+ _performPendingAnalysisTasks();
+ // Update A.
+ context.setContents(sourceA, r'''
+library lib_a;
+class A {
+ m2() {}
+}
+''');
+ _assertInvalid(sourceA, LIBRARY_ERRORS_READY);
+ _assertInvalid(sourceB, LIBRARY_ERRORS_READY);
+ }
+
void test_usedName_indirectUser() {
Source sourceA = addSource("/a.dart", r'''
library lib_a;
« no previous file with comments | « pkg/analyzer/test/generated/incremental_resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698