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

Unified Diff: pkg/analyzer/test/src/dart/analysis/driver_test.dart

Issue 2500533002: Add MemoryByteStore and use it in tests. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/byte_store.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/dart/analysis/driver_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index ccdcc9223baf1228ba20f462feb9980e3e3cbfe1..3b7d74d4a6b7d13c15632afd34a17b6934e71478 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -53,7 +53,7 @@ class AnalysisDriverSchedulerTest {
static final MockSdk sdk = new MockSdk();
final MemoryResourceProvider provider = new MemoryResourceProvider();
- final ByteStore byteStore = new _TestByteStore();
+ final ByteStore byteStore = new MemoryByteStore();
final FileContentOverlay contentOverlay = new FileContentOverlay();
final StringBuffer logBuffer = new StringBuffer();
@@ -220,7 +220,7 @@ class AnalysisDriverTest {
static final MockSdk sdk = new MockSdk();
final MemoryResourceProvider provider = new MemoryResourceProvider();
- final ByteStore byteStore = new _TestByteStore();
+ final ByteStore byteStore = new MemoryByteStore();
final FileContentOverlay contentOverlay = new FileContentOverlay();
final StringBuffer logBuffer = new StringBuffer();
@@ -1240,17 +1240,3 @@ class _Monitor {
}
}
}
-
-class _TestByteStore implements ByteStore {
- final map = <String, List<int>>{};
-
- @override
- List<int> get(String key) {
- return map[key];
- }
-
- @override
- void put(String key, List<int> bytes) {
- map[key] = bytes;
- }
-}
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/byte_store.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698