| 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 63130a5cbcfd905f9872605145a5105d4ff7d183..b2e1f0493d69518eaa94363a97cbbbadfc6ecb5e 100644
|
| --- a/pkg/analyzer/test/src/context/context_test.dart
|
| +++ b/pkg/analyzer/test/src/context/context_test.dart
|
| @@ -1397,6 +1397,22 @@ main() {}''');
|
| expect(analysisResult.changeNotices, isNotNull);
|
| }
|
|
|
| + void test_handleContentsChanged_incremental_newContentsNull() {
|
| + context.analysisOptions = new AnalysisOptionsImpl()..incremental = true;
|
| + ContentCache contentCache = new ContentCache();
|
| + context.contentCache = contentCache;
|
| + // old contents
|
| + String oldContents = 'foo() {}';
|
| + Source source = resourceProvider.getFile('/test.dart').createSource();
|
| + contentCache.setContents(source, oldContents);
|
| + expect(context.computeLibraryElement(source), isNotNull);
|
| + // new contents
|
| + String newContents = null;
|
| + contentCache.setContents(source, newContents);
|
| + context.handleContentsChanged(source, oldContents, newContents, true);
|
| + expect(context.getLibraryElement(source), isNull);
|
| + }
|
| +
|
| Future test_implicitAnalysisEvents_added() async {
|
| AnalyzedSourcesListener listener = new AnalyzedSourcesListener();
|
| context.implicitAnalysisEvents.listen(listener.onData);
|
|
|