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

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

Issue 2134283002: When validating cache consistency, skip sources in content cache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/context/context.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 252ed6268b8220d00f4ef3ad90e5b9e48d35d2a9..a851f55013cb35dd0e1293a146ce75ee23a92449 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -448,6 +448,13 @@ import 'libB.dart';''';
validator.sourceModificationTimesComputed([source1, source2],
[source1.modificationStamp, source2.modificationStamp]),
isFalse);
+ // Add overlay
+ context.setContents(source1, '// 1-2');
+ expect(
+ validator.sourceModificationTimesComputed([source1, source2],
+ [source1.modificationStamp + 1, source2.modificationStamp]),
+ isFalse);
+ context.setContents(source1, null);
// Different modification times.
expect(
validator.sourceModificationTimesComputed([source1, source2],
@@ -465,15 +472,7 @@ import 'libB.dart';''';
Source source2 = resourceProvider.newFile(path2, '// 2-1').createSource();
context.applyChanges(
new ChangeSet()..addedSource(source1)..addedSource(source2));
- // No overlays.
- expect(validator.getSourcesToComputeModificationTimes(),
- unorderedEquals([source1, source2]));
- // Add an overlay.
- context.setContents(source1, '// 1-2');
- expect(validator.getSourcesToComputeModificationTimes(),
- unorderedEquals([source2]));
- // Remove an overlay.
- context.setContents(source1, null);
+ // Verify.
expect(validator.getSourcesToComputeModificationTimes(),
unorderedEquals([source1, source2]));
}
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698