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

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

Issue 2091883002: Add '--finer-grained-invalidation' option to Analysis Server. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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 b102bc2d826baccce2e6bbef41cfd903f962dd8c..eca096475f6f84a04737cc850523cfe42e65bed3 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -1860,7 +1860,7 @@ void g() { f(null); }''');
reason: "part resolved 1");
// update and analyze #1
context.setContents(partSource, "part of lib; // 1");
- if (AnalysisEngine.instance.limitInvalidationInTaskModel) {
+ if (context.analysisOptions.finerGrainedInvalidation) {
expect(
context.getResolvedCompilationUnit2(libSource, libSource), isNotNull,
reason: "library changed 2");
@@ -1882,7 +1882,7 @@ void g() { f(null); }''');
}
// update and analyze #2
context.setContents(partSource, "part of lib; // 12");
- if (AnalysisEngine.instance.limitInvalidationInTaskModel) {
+ if (context.analysisOptions.finerGrainedInvalidation) {
expect(
context.getResolvedCompilationUnit2(libSource, libSource), isNotNull,
reason: "library changed 3");
@@ -2038,7 +2038,7 @@ library expectedToFindSemicolon
_changeSource(source, "");
source.generateExceptionOnRead = true;
_analyzeAll_assertFinished();
- if (AnalysisEngine.instance.limitInvalidationInTaskModel) {
+ if (context.analysisOptions.finerGrainedInvalidation) {
expect(source.readCount, 7);
} else {
expect(source.readCount, 4);
@@ -2634,20 +2634,14 @@ int a = 0;''');
class LimitedInvalidateTest extends AbstractContextTest {
@override
void setUp() {
- AnalysisEngine.instance.limitInvalidationInTaskModel = true;
super.setUp();
AnalysisOptionsImpl options =
new AnalysisOptionsImpl.from(context.analysisOptions);
options.incremental = true;
+ options.finerGrainedInvalidation = true;
context.analysisOptions = options;
}
- @override
- void tearDown() {
- AnalysisEngine.instance.limitInvalidationInTaskModel = false;
- super.tearDown();
- }
-
void test_sequence_class_give_take() {
Source a = addSource(
'/a.dart',
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/src/task/incremental_element_builder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698