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

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

Issue 1737693004: Update SOURCE_KIND when a missing source file appears (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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 cbcfacf981eb8edf00b9d29f587ef041c7f37db7..d7e0a589a8332abb27ec4495d480e703e2f97f9f 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -2548,7 +2548,7 @@ class B {
expect(unitA.element, same(unitElementA));
expect(unitElementA.library, same(libraryElementA));
}
- // Update a.dart, rename A to A2, invalidates b.dart, so
+ // Add method to a.dart. This invalidates b.dart, so
// we know that the previous update did not damage dependencies.
context.setContents(
sourceA,
@@ -2760,8 +2760,10 @@ class A {
}
void _assertInvalid(AnalysisTarget target, ResultDescriptor descriptor) {
- CacheState state = analysisCache.getState(target, descriptor);
- expect(state, CacheState.INVALID);
+ CacheState actual = analysisCache.getState(target, descriptor);
+ if (actual != CacheState.INVALID) {
+ fail("cache state of $target $descriptor: wanted INVALID, got: $actual");
+ }
}
void _assertValid(AnalysisTarget target, ResultDescriptor descriptor) {

Powered by Google App Engine
This is Rietveld 408576698