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

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

Issue 1448173002: Add ApplyChangesStatus to AnalysisContext.applyChanges() and use it in DAS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 8fed2aaf699e2c4c3edd7a51d687d0fb42a14e14..5fd792612f7a9f60891bf123071420a156fcddb5 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -25,6 +25,7 @@ import 'package:analyzer/src/generated/engine.dart'
AnalysisOptions,
AnalysisOptionsImpl,
AnalysisResult,
+ ApplyChangesStatus,
CacheState,
ChangeNotice,
ChangeSet,
@@ -296,8 +297,9 @@ int b = aa;''';
}
void test_applyChanges_overriddenSource() {
- // Note: addSource adds the source to the contentCache.
- Source source = addSource("/test.dart", "library test;");
+ String content = "library test;";
+ Source source = addSource("/test.dart", content);
+ context.setContents(source, content);
context.computeErrors(source);
while (!context.sourcesNeedingProcessing.isEmpty) {
context.performAnalysisTask();
@@ -306,7 +308,8 @@ int b = aa;''';
// it is already overridden in the content cache.
ChangeSet changeSet = new ChangeSet();
changeSet.changedSource(source);
- context.applyChanges(changeSet);
+ ApplyChangesStatus changesStatus = context.applyChanges(changeSet);
+ expect(changesStatus.hasChanges, isFalse);
expect(context.sourcesNeedingProcessing, hasLength(0));
}
« pkg/analyzer/lib/src/context/context.dart ('K') | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698