| Index: pkg/analyzer/test/src/task/general_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/general_test.dart b/pkg/analyzer/test/src/task/general_test.dart
|
| index 664a2d62b9a1c9ccff5b05b0dbd9ee955022559f..a043c84242bc7872ec0911a4c7277869ada7dd8b 100644
|
| --- a/pkg/analyzer/test/src/task/general_test.dart
|
| +++ b/pkg/analyzer/test/src/task/general_test.dart
|
| @@ -66,6 +66,16 @@ class GetContentTaskTest extends EngineTestCase {
|
| expect(task.outputs[CONTENT], 'foo');
|
| expect(task.outputs[MODIFICATION_TIME], 42);
|
| }
|
| +
|
| + void test_perform_exception() {
|
| + AnalysisContext context = new _MockContext();
|
| + Source target = new TestSource();
|
| + GetContentTask task = new GetContentTask(context, target);
|
| + when(context.getContents(target)).thenThrow('My exception!');
|
| + task.perform();
|
| + expect(task.caughtException, isNotNull);
|
| + expect(task.outputs, isEmpty);
|
| + }
|
| }
|
|
|
| class _MockContext extends TypedMock implements AnalysisContext {
|
|
|