| Index: pkg/analysis_server/test/edit/fixes_test.dart
|
| diff --git a/pkg/analysis_server/test/edit/fixes_test.dart b/pkg/analysis_server/test/edit/fixes_test.dart
|
| index 58f4b540ed999300e67651d8cdd726e7bce63164..2d2f1c085aa3e90ee9f38d2bc24124428c0f6ad2 100644
|
| --- a/pkg/analysis_server/test/edit/fixes_test.dart
|
| +++ b/pkg/analysis_server/test/edit/fixes_test.dart
|
| @@ -29,6 +29,25 @@ class FixesTest extends AbstractAnalysisTest {
|
| handler = new EditDomainHandler(server);
|
| }
|
|
|
| + Future test_fixUndefinedClass() {
|
| + addTestFile('''
|
| +main() {
|
| + Future<String> x = null;
|
| +}
|
| +''');
|
| + return waitForTasksFinished().then((_) {
|
| + List<AnalysisErrorFixes> errorFixes = _getFixesAt('Future<String>');
|
| + expect(errorFixes, hasLength(1));
|
| + AnalysisError error = errorFixes[0].error;
|
| + expect(error.severity, AnalysisErrorSeverity.WARNING);
|
| + expect(error.type, AnalysisErrorType.STATIC_WARNING);
|
| + List<SourceChange> fixes = errorFixes[0].fixes;
|
| + expect(fixes, hasLength(2));
|
| + expect(fixes[0].message, matches('Import library'));
|
| + expect(fixes[1].message, matches('Create class'));
|
| + });
|
| + }
|
| +
|
| Future test_hasFixes() {
|
| addTestFile('''
|
| foo() {
|
|
|