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

Unified Diff: pkg/analyzer/test/generated/engine_test.dart

Issue 981283003: Change all sources associated with changed files (issue 22680) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 years, 9 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/generated/engine_test.dart
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index 35e96603d76f3b1b5feedca88aa536ca1c8918c0..0949de758143a98c4701ffb06cc58f992ee59577 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -1280,6 +1280,26 @@ main() {}''');
expect(_context.sourceFactory, same(_sourceFactory));
}
+ void test_getSourcesWithFullName() {
+ String filePath = '/foo/lib/file.dart';
+ List<Source> expected = <Source>[];
+ ChangeSet changeSet = new ChangeSet();
+
+ TestSourceWithUri source1 =
+ new TestSourceWithUri(filePath, Uri.parse('file://$filePath'));
+ expected.add(source1);
+ changeSet.addedSource(source1);
+
+ TestSourceWithUri source2 =
+ new TestSourceWithUri(filePath, Uri.parse('package:foo/file.dart'));
+ expected.add(source2);
+ changeSet.addedSource(source2);
+
+ _context.applyChanges(changeSet);
+ expect(
+ _context.getSourcesWithFullName(filePath), unorderedEquals(expected));
+ }
+
void test_getStatistics() {
AnalysisContextStatistics statistics = _context.statistics;
expect(statistics, isNotNull);
@@ -5649,6 +5669,11 @@ class TestAnalysisContext implements InternalAnalysisContext {
return null;
}
@override
+ List<Source> getSourcesWithFullName(String path) {
+ fail("Unexpected invocation of getSourcesWithFullName");
+ return null;
+ }
+ @override
bool handleContentsChanged(
Source source, String originalContents, String newContents, bool notify) {
fail("Unexpected invocation of handleContentsChanged");
@@ -5713,6 +5738,7 @@ class TestAnalysisContext implements InternalAnalysisContext {
void setContents(Source source, String contents) {
fail("Unexpected invocation of setContents");
}
+
@override
void visitCacheItems(void callback(Source source, SourceEntry dartEntry,
DataDescriptor rowDesc, CacheState state)) {

Powered by Google App Engine
This is Rietveld 408576698