| Index: pkg/analysis_server/test/services/correction/fix_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| index fa6530d8495a7c0965a6ac1d1fbf02e952d086e7..996df309af2b081a794fd36131177e78349475be 100644
|
| --- a/pkg/analysis_server/test/services/correction/fix_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| @@ -31,6 +31,8 @@ class FixProcessorTest extends AbstractSingleUnitTest {
|
| Index index;
|
| SearchEngineImpl searchEngine;
|
|
|
| + bool checkHasSingleError = true;
|
| +
|
| Fix fix;
|
| SourceChange change;
|
| String resultCode;
|
| @@ -1248,6 +1250,20 @@ main() {
|
| ''');
|
| }
|
|
|
| + void test_replaceVarWithDynamic() {
|
| + checkHasSingleError = false;
|
| + _indexTestUnit('''
|
| +class A {
|
| + Map<String, var> m;
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.REPLACE_VAR_WITH_DYNAMIC, '''
|
| +class A {
|
| + Map<String, dynamic> m;
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_replaceWithConstInstanceCreation() {
|
| _indexTestUnit('''
|
| class A {
|
| @@ -1811,11 +1827,9 @@ main() {
|
|
|
| AnalysisError _findErrorToFix() {
|
| List<AnalysisError> errors = context.computeErrors(testSource);
|
| - expect(
|
| - errors,
|
| - hasLength(1),
|
| - reason: 'Exactly 1 error expected, but ${errors.length} found:\n' +
|
| - errors.join('\n'));
|
| + if (checkHasSingleError) {
|
| + expect(errors, hasLength(1));
|
| + }
|
| return errors[0];
|
| }
|
|
|
|
|