| Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java
|
| index f84e7f4b59ffbd118cdf28f8f7190891e4d79968..e4a0093fae1a863b07c1a9bdc1d0bb6fa81f1dfc 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/internal/context/AnalysisContextImplTest.java
|
| @@ -187,6 +187,21 @@ public class AnalysisContextImplTest extends EngineTestCase {
|
| assertNull(context.performAnalysisTask().getChangeNotices());
|
| }
|
|
|
| + public void test_applyChanges_overriddenSource() throws Exception {
|
| + // Note: addSource adds the source to the contentCache.
|
| + Source source = addSource("/test.dart", "library test;");
|
| + context.computeErrors(source);
|
| + while (!context.getSourcesNeedingProcessing().isEmpty()) {
|
| + context.performAnalysisTask();
|
| + }
|
| + // Adding the source as a changedSource should have no effect since it is already overridden
|
| + // in the content cache.
|
| + ChangeSet changeSet = new ChangeSet();
|
| + changeSet.changedSource(source);
|
| + context.applyChanges(changeSet);
|
| + assertSizeOfList(0, context.getSourcesNeedingProcessing());
|
| + }
|
| +
|
| public void test_applyChanges_remove() throws Exception {
|
| context = AnalysisContextFactory.contextWithCore();
|
| sourceFactory = context.getSourceFactory();
|
|
|