Chromium Code Reviews| 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 fb2ee76a91fd828cd664a55bb6f1727cb60ce000..73cdfeb2df0bf5920a9299b4ac7ddb08533e2201 100644 |
| --- a/pkg/analysis_server/test/edit/fixes_test.dart |
| +++ b/pkg/analysis_server/test/edit/fixes_test.dart |
| @@ -9,6 +9,7 @@ import 'dart:async'; |
| import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| import 'package:analysis_server/src/domain_analysis.dart'; |
| import 'package:analysis_server/src/edit/edit_domain.dart'; |
| +import 'package:analysis_server/src/services/correction/fix.dart'; |
| import 'package:plugin/manager.dart'; |
| import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| import 'package:unittest/unittest.dart' hide ERROR; |
| @@ -37,6 +38,7 @@ class FixesTest extends AbstractAnalysisTest { |
| addTestFile(''' |
| main() { |
| Future<String> x = null; |
| + print(x); |
|
scheglov
2016/03/04 18:55:20
Why do we need this statement?
pquitslund
2016/03/04 19:09:39
Without it, we get an `unused_local_variable` hint
|
| } |
| '''); |
| await waitForTasksFinished(); |
| @@ -46,9 +48,11 @@ main() { |
| expect(error.severity, AnalysisErrorSeverity.WARNING); |
| expect(error.type, AnalysisErrorType.STATIC_WARNING); |
| List<SourceChange> fixes = errorFixes[0].fixes; |
| - expect(fixes, hasLength(2)); |
| + expect(fixes, hasLength(3)); |
| expect(fixes[0].message, matches('Import library')); |
| expect(fixes[1].message, matches('Create class')); |
| + expect( |
| + fixes[2].message, matches("Ignore error with code 'undefined_class'")); |
| } |
| test_hasFixes() async { |