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

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

Issue 1411243010: Adding a not explicit source makes it explicit. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 62b499015ed77f9d18a7a005dc18ba80aac36394..39496e55c6dbd18f0a25e5e650e10d34ca6efc63 100644
--- a/pkg/analyzer/test/src/context/context_test.dart
+++ b/pkg/analyzer/test/src/context/context_test.dart
@@ -150,6 +150,19 @@ class AnalysisContextImplTest extends AbstractContextTest {
});
}
+ void test_applyChanges_add_makesExplicit() {
+ Source source = newSource('/test.dart');
+ // get the entry, it's not explicit
+ CacheEntry entry = context.getCacheEntry(source);
+ expect(entry.explicitlyAdded, isFalse);
+ // add the source
+ ChangeSet changeSet = new ChangeSet();
+ changeSet.addedSource(source);
+ context.applyChanges(changeSet);
+ // now the entry is explicit
+ expect(entry.explicitlyAdded, isTrue);
+ }
+
Future test_applyChanges_change() {
SourcesChangedListener listener = new SourcesChangedListener();
context.onSourcesChanged.listen(listener.onData);
« 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