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

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

Issue 2267273004: Use FlushTargetFilter to pre-filter targets before checking their results. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/cache.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/context/cache_test.dart
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index bc8342a2400ce88725f3da4eae68e3e2ba9bcc4c..1d4bc4f18ece8cb1c5ce71a8c0aa3b197b10794a 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -70,7 +70,7 @@ class AnalysisCacheTest extends AbstractCacheTest {
expect(cache.getValue(target, resultA), 'a');
expect(cache.getValue(target, resultB), 'b');
// flush A
- cache.flush((target, result) => result == resultA);
+ cache.flush((target) => true, (target, result) => result == resultA);
expect(cache.getState(target, resultA), CacheState.FLUSHED);
expect(cache.getState(target, resultB), CacheState.VALID);
expect(cache.getValue(target, resultA), isNull);
@@ -336,7 +336,7 @@ class CacheEntryTest extends AbstractCacheTest {
expect(entry.getValue(resultA), 'a');
expect(entry.getValue(resultB), 'b');
// flush A
- entry.flush((target, result) => result == resultA);
+ entry.flush((target) => true, (target, result) => result == resultA);
expect(entry.getState(resultA), CacheState.FLUSHED);
expect(entry.getState(resultB), CacheState.VALID);
expect(entry.getValue(resultA), isNull);
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698