diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart index b96340ea5f652..92d8bf21ee34c 100644 --- a/pkg/analysis_server/test/abstract_context.dart +++ b/pkg/analysis_server/test/abstract_context.dart @@ -112,6 +112,33 @@ class _IsTestGroup { return source; } + /** + * Call a test that we think will fail. + * + * Ensure that we return any thrown exception correctly (avoiding the + * package:test zone error handler). + */ + Future callFailingTest(Future Function() expectedFailingTestFn) { + final Completer completer = new Completer(); + + try { + runZoned( + () async => await expectedFailingTestFn(), + onError: (error) { + completer.completeError(error); + }, + ).then((result) { + completer.complete(result); + }).catchError((error) { + completer.completeError(error); + }); + } catch (error) { + completer.completeError(error); + } + + return completer.future; + } + /** * Re-configure the driver. This is necessary, for example, after defining a * new package that test code will reference. diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart index 999a4da48f051..2f321260fdf8f 100644 --- a/pkg/analysis_server/test/services/correction/fix_test.dart +++ b/pkg/analysis_server/test/services/correction/fix_test.dart @@ -30,7 +30,9 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(FixProcessorTest); + defineReflectiveTests(FixProcessorTest_UseCFE); defineReflectiveTests(LintFixTest); + defineReflectiveTests(LintFixTest_UseCFE); }); } @@ -7054,6 +7056,1107 @@ class Required { } } +@reflectiveTest +class FixProcessorTest_UseCFE extends FixProcessorTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_addAsync_blockFunctionBody() => super.test_addAsync_blockFunctionBody(); + + @failingTest + @override + test_addAsync_closure() => super.test_addAsync_closure(); + + @failingTest + @override + test_addAsync_expressionFunctionBody() => + super.test_addAsync_expressionFunctionBody(); + + @failingTest + @override + test_addAsync_returnFuture() => super.test_addAsync_returnFuture(); + + @failingTest + @override + test_addAsync_returnFuture_alreadyFuture() => + super.test_addAsync_returnFuture_alreadyFuture(); + + @failingTest + @override + test_addAsync_returnFuture_dynamic() => + super.test_addAsync_returnFuture_dynamic(); + + @failingTest + @override + test_addAsync_returnFuture_noType() => + super.test_addAsync_returnFuture_noType(); + + @failingTest + @override + test_addExplicitCast_assignment_general() => + super.test_addExplicitCast_assignment_general(); + + @failingTest + @override + test_addExplicitCast_assignment_general_all() => + super.test_addExplicitCast_assignment_general_all(); + + @failingTest + @override + test_addExplicitCast_assignment_map() => + super.test_addExplicitCast_assignment_map(); + + @failingTest + @override + test_addExplicitCast_assignment_map_all() => + super.test_addExplicitCast_assignment_map_all(); + + @failingTest + @override + test_addExplicitCast_assignment_needsParens() => + super.test_addExplicitCast_assignment_needsParens(); + + @failingTest + @override + test_addExplicitCast_assignment_needsParens_all() => + super.test_addExplicitCast_assignment_needsParens_all(); + + @failingTest + @override + test_addExplicitCast_assignment_set() => + super.test_addExplicitCast_assignment_set(); + + @failingTest + @override + test_addExplicitCast_assignment_set_all() => + super.test_addExplicitCast_assignment_set_all(); + + @failingTest + @override + test_addExplicitCast_declaration_general() => + super.test_addExplicitCast_declaration_general(); + + @failingTest + @override + test_addExplicitCast_declaration_general_all() => + super.test_addExplicitCast_declaration_general_all(); + + @failingTest + @override + test_addExplicitCast_declaration_map() => + super.test_addExplicitCast_declaration_map(); + + @failingTest + @override + test_addExplicitCast_declaration_map_all() => + super.test_addExplicitCast_declaration_map_all(); + + @failingTest + @override + test_addExplicitCast_declaration_needsParens() => + super.test_addExplicitCast_declaration_needsParens(); + + @failingTest + @override + test_addExplicitCast_declaration_needsParens_all() => + super.test_addExplicitCast_declaration_needsParens_all(); + + @failingTest + @override + test_addExplicitCast_declaration_set() => + super.test_addExplicitCast_declaration_set(); + + @failingTest + @override + test_addExplicitCast_declaration_set_all() => + super.test_addExplicitCast_declaration_set_all(); + + @failingTest + @override + test_addFieldFormalParameters_flutter() => + super.test_addFieldFormalParameters_flutter(); + + @failingTest + @override + test_addFieldFormalParameters_hasRequiredParameter() => + super.test_addFieldFormalParameters_hasRequiredParameter(); + + @failingTest + @override + test_addFieldFormalParameters_noParameters() => + super.test_addFieldFormalParameters_noParameters(); + + @failingTest + @override + test_addFieldFormalParameters_noRequiredParameter() => + super.test_addFieldFormalParameters_noRequiredParameter(); + + @failingTest + @override + test_addFieldFormalParameters_notAllFinal() => + super.test_addFieldFormalParameters_notAllFinal(); + + @failingTest + @override + test_addMissingParameter_function_positional_hasZero() => + super.test_addMissingParameter_function_positional_hasZero(); + + @failingTest + @override + test_addMissingParameter_function_required_hasNamed() => + super.test_addMissingParameter_function_required_hasNamed(); + + @failingTest + @override + test_addMissingParameter_function_required_hasOne() => + super.test_addMissingParameter_function_required_hasOne(); + + @failingTest + @override + test_addMissingParameter_function_required_hasZero() => + super.test_addMissingParameter_function_required_hasZero(); + + @failingTest + @override + test_addMissingParameter_method_positional_hasOne() => + super.test_addMissingParameter_method_positional_hasOne(); + + @failingTest + @override + test_addMissingParameter_method_required_hasOne() => + super.test_addMissingParameter_method_required_hasOne(); + + @failingTest + @override + test_addMissingParameter_method_required_hasZero() => + super.test_addMissingParameter_method_required_hasZero(); + + @failingTest + @override + test_addMissingParameterNamed_constructor_hasNamed() => + super.test_addMissingParameterNamed_constructor_hasNamed(); + + @failingTest + @override + test_addMissingParameterNamed_constructor_hasRequired() => + super.test_addMissingParameterNamed_constructor_hasRequired(); + + @failingTest + @override + test_addMissingParameterNamed_constructor_noParameters() => + super.test_addMissingParameterNamed_constructor_noParameters(); + + @failingTest + @override + test_addMissingParameterNamed_constructor_noParameters_named() => + super.test_addMissingParameterNamed_constructor_noParameters_named(); + + @failingTest + @override + test_addMissingParameterNamed_function_hasNamed() => + super.test_addMissingParameterNamed_function_hasNamed(); + + @failingTest + @override + test_addMissingParameterNamed_function_hasRequired() => + super.test_addMissingParameterNamed_function_hasRequired(); + + @failingTest + @override + test_addMissingParameterNamed_function_noParameters() => + super.test_addMissingParameterNamed_function_noParameters(); + + @failingTest + @override + test_addMissingParameterNamed_method_hasNamed() => + super.test_addMissingParameterNamed_method_hasNamed(); + + @failingTest + @override + test_addMissingParameterNamed_method_hasRequired() => + super.test_addMissingParameterNamed_method_hasRequired(); + + @failingTest + @override + test_addMissingParameterNamed_method_noParameters() => + super.test_addMissingParameterNamed_method_noParameters(); + + @failingTest + @override + test_addMissingRequiredArg_multiple() => + super.test_addMissingRequiredArg_multiple(); + + @failingTest + @override + test_addMissingRequiredArg_multiple_2() => + super.test_addMissingRequiredArg_multiple_2(); + + @failingTest + @override + test_addMissingRequiredArg_single() => + super.test_addMissingRequiredArg_single(); + + @failingTest + @override + test_addMissingRequiredArg_single_normal() => + super.test_addMissingRequiredArg_single_normal(); + + @failingTest + @override + test_addMissingRequiredArg_single_with_details() => + super.test_addMissingRequiredArg_single_with_details(); + + @failingTest + @override + test_addStatic_multipleFields() => super.test_addStatic_multipleFields(); + + @failingTest + @override + test_addStatic_oneField() => super.test_addStatic_oneField(); + + @failingTest + @override + test_boolean() => super.test_boolean(); + + @failingTest + @override + test_boolean_all() => super.test_boolean_all(); + + @failingTest + @override + test_changeToStaticAccess_method() => + super.test_changeToStaticAccess_method(); + + @failingTest + @override + test_changeToStaticAccess_method_importType() => + super.test_changeToStaticAccess_method_importType(); + + @failingTest + @override + test_changeToStaticAccess_method_prefixLibrary() => + super.test_changeToStaticAccess_method_prefixLibrary(); + + @failingTest + @override + test_changeToStaticAccess_property() => + super.test_changeToStaticAccess_property(); + + @failingTest + @override + test_changeToStaticAccess_property_importType() => + super.test_changeToStaticAccess_property_importType(); + + @failingTest + @override + test_convertToNamedArguments_OK_instanceCreation() => + super.test_convertToNamedArguments_OK_instanceCreation(); + + @failingTest + @override + test_convertToNamedArguments_OK_instanceCreation_hasPositional() => + super.test_convertToNamedArguments_OK_instanceCreation_hasPositional(); + + @failingTest + @override + test_convertToNamedArguments_OK_methodInvocation() => + super.test_convertToNamedArguments_OK_methodInvocation(); + + @failingTest + @override + test_createClass() => super.test_createClass(); + + @failingTest + @override + test_createClass_inLibraryOfPrefix() => + super.test_createClass_inLibraryOfPrefix(); + + @failingTest + @override + test_createClass_innerLocalFunction() => + super.test_createClass_innerLocalFunction(); + + @failingTest + @override + test_createClass_instanceCreation_withoutNew_fromFunction() => + super.test_createClass_instanceCreation_withoutNew_fromFunction(); + + @failingTest + @override + test_createClass_instanceCreation_withoutNew_fromMethod() => + super.test_createClass_instanceCreation_withoutNew_fromMethod(); + + @failingTest + @override + test_createClass_itemOfList() => super.test_createClass_itemOfList(); + + @failingTest + @override + test_createClass_itemOfList_inAnnotation() => + super.test_createClass_itemOfList_inAnnotation(); + + @failingTest + @override + test_createConstructor_forFinalFields() => + super.test_createConstructor_forFinalFields(); + + @failingTest + @override + test_createConstructor_forFinalFields_flutter() => + super.test_createConstructor_forFinalFields_flutter(); + + @failingTest + @override + test_createConstructor_forFinalFields_flutter_childLast() => + super.test_createConstructor_forFinalFields_flutter_childLast(); + + @failingTest + @override + test_createConstructor_forFinalFields_flutter_childrenLast() => + super.test_createConstructor_forFinalFields_flutter_childrenLast(); + + @failingTest + @override + test_createConstructor_insteadOfSyntheticDefault() => + super.test_createConstructor_insteadOfSyntheticDefault(); + + @failingTest + @override + test_createConstructor_named() => super.test_createConstructor_named(); + + @failingTest + @override + test_createConstructor_named_emptyClassBody() => + super.test_createConstructor_named_emptyClassBody(); + + @failingTest + @override + test_createConstructorSuperExplicit() => + super.test_createConstructorSuperExplicit(); + + @failingTest + @override + test_createConstructorSuperExplicit_hasInitializers() => + super.test_createConstructorSuperExplicit_hasInitializers(); + + @failingTest + @override + test_createConstructorSuperExplicit_named() => + super.test_createConstructorSuperExplicit_named(); + + @failingTest + @override + test_createConstructorSuperExplicit_named_private() => + super.test_createConstructorSuperExplicit_named_private(); + + @failingTest + @override + test_createConstructorSuperExplicit_typeArgument() => + super.test_createConstructorSuperExplicit_typeArgument(); + + @failingTest + @override + test_createConstructorSuperImplicit() => + super.test_createConstructorSuperImplicit(); + + @failingTest + @override + test_createConstructorSuperImplicit_fieldInitializer() => + super.test_createConstructorSuperImplicit_fieldInitializer(); + + @failingTest + @override + test_createConstructorSuperImplicit_importType() => + super.test_createConstructorSuperImplicit_importType(); + + @failingTest + @override + test_createConstructorSuperImplicit_named() => + super.test_createConstructorSuperImplicit_named(); + + @failingTest + @override + test_createConstructorSuperImplicit_private() => + super.test_createConstructorSuperImplicit_private(); + + @failingTest + @override + test_createConstructorSuperImplicit_typeArgument() => + super.test_createConstructorSuperImplicit_typeArgument(); + + @failingTest + @override + test_createField_getter_unqualified_instance_asInvocationArgument() => + super.test_createField_getter_unqualified_instance_asInvocationArgument(); + + @failingTest + @override + test_createField_getter_unqualified_instance_assignmentRhs() => + super.test_createField_getter_unqualified_instance_assignmentRhs(); + + @failingTest + @override + test_createField_getter_unqualified_instance_asStatement() => + super.test_createField_getter_unqualified_instance_asStatement(); + + @failingTest + @override + test_createField_invalidInitializer_withoutType() => + super.test_createField_invalidInitializer_withoutType(); + + @failingTest + @override + test_createField_invalidInitializer_withType() => + super.test_createField_invalidInitializer_withType(); + + @failingTest + @override + test_createField_setter_generic_OK_local() => + super.test_createField_setter_generic_OK_local(); + + @failingTest + @override + test_createField_setter_unqualified_instance() => + super.test_createField_setter_unqualified_instance(); + + @failingTest + @override + test_createFile_forImport() => super.test_createFile_forImport(); + + @failingTest + @override + test_createFile_forImport_BAD_inPackage_lib_justLib() => + super.test_createFile_forImport_BAD_inPackage_lib_justLib(); + + @failingTest + @override + test_createFile_forImport_BAD_notDart() => + super.test_createFile_forImport_BAD_notDart(); + + @failingTest + @override + test_createFile_forImport_inPackage_lib() => + super.test_createFile_forImport_inPackage_lib(); + + @failingTest + @override + test_createFile_forImport_inPackage_test() => + super.test_createFile_forImport_inPackage_test(); + + @failingTest + @override + test_createFile_forPart() => super.test_createFile_forPart(); + + @failingTest + @override + test_createFile_forPart_inPackageLib() => + super.test_createFile_forPart_inPackageLib(); + + @failingTest + @override + test_createGetter_unqualified_instance_asInvocationArgument() => + super.test_createGetter_unqualified_instance_asInvocationArgument(); + + @failingTest + @override + test_createGetter_unqualified_instance_assignmentLhs() => + super.test_createGetter_unqualified_instance_assignmentLhs(); + + @failingTest + @override + test_createGetter_unqualified_instance_assignmentRhs() => + super.test_createGetter_unqualified_instance_assignmentRhs(); + + @failingTest + @override + test_createGetter_unqualified_instance_asStatement() => + super.test_createGetter_unqualified_instance_asStatement(); + + @failingTest + @override + test_createLocalVariable_functionType_named() => + super.test_createLocalVariable_functionType_named(); + + @failingTest + @override + test_createLocalVariable_functionType_named_generic() => + super.test_createLocalVariable_functionType_named_generic(); + + @override + test_createLocalVariable_functionType_synthetic() => + super.test_createLocalVariable_functionType_synthetic(); + + @failingTest + @override + test_createLocalVariable_read_typeAssignment() => + super.test_createLocalVariable_read_typeAssignment(); + + @failingTest + @override + test_createLocalVariable_read_typeCondition() => + super.test_createLocalVariable_read_typeCondition(); + + @failingTest + @override + test_createLocalVariable_read_typeInvocationArgument() => + super.test_createLocalVariable_read_typeInvocationArgument(); + + @failingTest + @override + test_createLocalVariable_read_typeInvocationTarget() => + super.test_createLocalVariable_read_typeInvocationTarget(); + + @failingTest + @override + test_createLocalVariable_withImport() => + super.test_createLocalVariable_withImport(); + + @failingTest + @override + test_createLocalVariable_write_assignment() => + super.test_createLocalVariable_write_assignment(); + + @failingTest + @override + test_createLocalVariable_write_assignment_compound() => + super.test_createLocalVariable_write_assignment_compound(); + + @failingTest + @override + test_createMissingOverrides_field_untyped() => + super.test_createMissingOverrides_field_untyped(); + + @failingTest + @override + test_createMissingOverrides_functionTypeAlias() => + super.test_createMissingOverrides_functionTypeAlias(); + + @failingTest + @override + test_createMissingOverrides_functionTypedParameter() => + super.test_createMissingOverrides_functionTypedParameter(); + + @failingTest + @override + test_createMissingOverrides_generics_typeArguments() => + super.test_createMissingOverrides_generics_typeArguments(); + + @failingTest + @override + test_createMissingOverrides_generics_typeParameters() => + super.test_createMissingOverrides_generics_typeParameters(); + + @failingTest + @override + test_createMissingOverrides_getter() => + super.test_createMissingOverrides_getter(); + + @failingTest + @override + test_createMissingOverrides_importPrefix() => + super.test_createMissingOverrides_importPrefix(); + + @failingTest + @override + test_createMissingOverrides_mergeToField_getterSetter() => + super.test_createMissingOverrides_mergeToField_getterSetter(); + + @failingTest + @override + test_createMissingOverrides_method() => + super.test_createMissingOverrides_method(); + + @failingTest + @override + test_createMissingOverrides_method_emptyClassBody() => + super.test_createMissingOverrides_method_emptyClassBody(); + + @failingTest + @override + test_createMissingOverrides_method_generic() => + super.test_createMissingOverrides_method_generic(); + + @failingTest + @override + test_createMissingOverrides_method_generic_withBounds() => + super.test_createMissingOverrides_method_generic_withBounds(); + + @failingTest + @override + test_createMissingOverrides_method_notEmptyClassBody() => + super.test_createMissingOverrides_method_notEmptyClassBody(); + + @failingTest + @override + test_createMissingOverrides_operator() => + super.test_createMissingOverrides_operator(); + + @failingTest + @override + test_createMissingOverrides_setter() => + super.test_createMissingOverrides_setter(); + + @failingTest + @override + test_createNoSuchMethod_OK() => super.test_createNoSuchMethod_OK(); + + @failingTest + @override + test_creationFunction_forFunctionType_cascadeSecond() => + super.test_creationFunction_forFunctionType_cascadeSecond(); + + @failingTest + @override + test_creationFunction_forFunctionType_coreFunction() => + super.test_creationFunction_forFunctionType_coreFunction(); + + @failingTest + @override + test_creationFunction_forFunctionType_dynamicArgument() => + super.test_creationFunction_forFunctionType_dynamicArgument(); + + @failingTest + @override + test_creationFunction_forFunctionType_function() => + super.test_creationFunction_forFunctionType_function(); + + @failingTest + @override + test_creationFunction_forFunctionType_function_namedArgument() => + super.test_creationFunction_forFunctionType_function_namedArgument(); + + @failingTest + @override + test_creationFunction_forFunctionType_importType() => + super.test_creationFunction_forFunctionType_importType(); + + @failingTest + @override + test_creationFunction_forFunctionType_method_enclosingClass_static() => super + .test_creationFunction_forFunctionType_method_enclosingClass_static(); + + @failingTest + @override + test_creationFunction_forFunctionType_method_enclosingClass_static2() => super + .test_creationFunction_forFunctionType_method_enclosingClass_static2(); + + @failingTest + @override + test_creationFunction_forFunctionType_method_targetClass() => + super.test_creationFunction_forFunctionType_method_targetClass(); + + @failingTest + @override + test_creationFunction_forFunctionType_method_targetClass_hasOtherMember() => super + .test_creationFunction_forFunctionType_method_targetClass_hasOtherMember(); + + @failingTest + @override + test_expectedToken_semicolon() => super.test_expectedToken_semicolon(); + + @failingTest + @override + test_illegalAsyncReturnType_adjacentNodes() => + super.test_illegalAsyncReturnType_adjacentNodes(); + + @failingTest + @override + test_illegalAsyncReturnType_asyncLibrary_import() => + super.test_illegalAsyncReturnType_asyncLibrary_import(); + + @failingTest + @override + test_illegalAsyncReturnType_asyncLibrary_usePrefix() => + super.test_illegalAsyncReturnType_asyncLibrary_usePrefix(); + + @failingTest + @override + test_illegalAsyncReturnType_complexTypeName() => + super.test_illegalAsyncReturnType_complexTypeName(); + + @failingTest + @override + test_importLibraryPackage_preferDirectOverExport() => + super.test_importLibraryPackage_preferDirectOverExport(); + + @failingTest + @override + test_importLibraryPackage_preferDirectOverExport_src() => + super.test_importLibraryPackage_preferDirectOverExport_src(); + + @failingTest + @override + test_importLibraryProject_BAD_inLibSrc_differentContextRoot() => + super.test_importLibraryProject_BAD_inLibSrc_differentContextRoot(); + + @failingTest + @override + test_importLibraryProject_OK_inLibSrc_thisContextRoot() => + super.test_importLibraryProject_OK_inLibSrc_thisContextRoot(); + + @failingTest + @override + test_importLibraryProject_withClass_annotation() => + super.test_importLibraryProject_withClass_annotation(); + + @failingTest + @override + test_importLibraryProject_withClass_inParentFolder() => + super.test_importLibraryProject_withClass_inParentFolder(); + + @failingTest + @override + test_importLibraryProject_withClass_inRelativeFolder() => + super.test_importLibraryProject_withClass_inRelativeFolder(); + + @failingTest + @override + test_importLibraryProject_withClass_inSameFolder() => + super.test_importLibraryProject_withClass_inSameFolder(); + + @failingTest + @override + test_importLibraryProject_withClass_instanceCreation_implicit() => + super.test_importLibraryProject_withClass_instanceCreation_implicit(); + + @failingTest + @override + test_importLibraryProject_withFunction() => + super.test_importLibraryProject_withFunction(); + + @failingTest + @override + test_importLibraryProject_withFunction_unresolvedMethod() => + super.test_importLibraryProject_withFunction_unresolvedMethod(); + + @failingTest + @override + test_importLibraryProject_withFunctionTypeAlias() => + super.test_importLibraryProject_withFunctionTypeAlias(); + + @failingTest + @override + test_importLibraryProject_withTopLevelVariable() => + super.test_importLibraryProject_withTopLevelVariable(); + + @failingTest + @override + test_importLibrarySdk_withClass_AsExpression() => + super.test_importLibrarySdk_withClass_AsExpression(); + + @failingTest + @override + test_importLibrarySdk_withClass_instanceCreation_explicitNew() => + super.test_importLibrarySdk_withClass_instanceCreation_explicitNew(); + + @failingTest + @override + test_importLibrarySdk_withClass_instanceCreation_explicitNew_namedConstructor() => + super + .test_importLibrarySdk_withClass_instanceCreation_explicitNew_namedConstructor(); + + @failingTest + @override + test_importLibrarySdk_withClass_instanceCreation_implicitNew() => + super.test_importLibrarySdk_withClass_instanceCreation_implicitNew(); + + @failingTest + @override + test_importLibrarySdk_withClass_instanceCreation_implicitNew_namedConstructor() => + super + .test_importLibrarySdk_withClass_instanceCreation_implicitNew_namedConstructor(); + + @failingTest + @override + test_importLibrarySdk_withClass_invocationTarget() => + super.test_importLibrarySdk_withClass_invocationTarget(); + + @failingTest + @override + test_importLibrarySdk_withClass_IsExpression() => + super.test_importLibrarySdk_withClass_IsExpression(); + + @failingTest + @override + test_importLibrarySdk_withClass_itemOfList() => + super.test_importLibrarySdk_withClass_itemOfList(); + + @failingTest + @override + test_importLibrarySdk_withClass_itemOfList_inAnnotation() => + super.test_importLibrarySdk_withClass_itemOfList_inAnnotation(); + + @failingTest + @override + test_importLibrarySdk_withClass_typeAnnotation() => + super.test_importLibrarySdk_withClass_typeAnnotation(); + + @failingTest + @override + test_importLibrarySdk_withClass_typeAnnotation_PrefixedIdentifier() => + super.test_importLibrarySdk_withClass_typeAnnotation_PrefixedIdentifier(); + + @failingTest + @override + test_importLibrarySdk_withClass_typeArgument() => + super.test_importLibrarySdk_withClass_typeArgument(); + + @failingTest + @override + test_importLibrarySdk_withTopLevelVariable() => + super.test_importLibrarySdk_withTopLevelVariable(); + + @failingTest + @override + test_importLibrarySdk_withTopLevelVariable_annotation() => + super.test_importLibrarySdk_withTopLevelVariable_annotation(); + + @failingTest + @override + test_importLibraryShow_project() => super.test_importLibraryShow_project(); + + @failingTest + @override + test_importLibraryShow_sdk() => super.test_importLibraryShow_sdk(); + + @failingTest + @override + test_makeFieldNotFinal_hasType() => super.test_makeFieldNotFinal_hasType(); + + @failingTest + @override + test_makeFieldNotFinal_noType() => super.test_makeFieldNotFinal_noType(); + + @failingTest + @override + test_noException_1() => super.test_noException_1(); + + @failingTest + @override + test_nonBoolCondition_addNotNull() => + super.test_nonBoolCondition_addNotNull(); + + @failingTest + @override + test_nonBoolCondition_addNotNull_all() => + super.test_nonBoolCondition_addNotNull_all(); + + @failingTest + @override + test_removeParentheses_inGetterDeclaration() => + super.test_removeParentheses_inGetterDeclaration(); + + @failingTest + @override + test_removeParentheses_inGetterInvocation() => + super.test_removeParentheses_inGetterInvocation(); + + @failingTest + @override + test_replaceVarWithDynamic() => super.test_replaceVarWithDynamic(); + + @failingTest + @override + test_replaceWithConstInstanceCreation_explicitNew() => + super.test_replaceWithConstInstanceCreation_explicitNew(); + + @failingTest + @override + test_undefinedClass_useSimilar_BAD_prefixed() => + super.test_undefinedClass_useSimilar_BAD_prefixed(); + + @failingTest + @override + test_undefinedClass_useSimilar_fromImport() => + super.test_undefinedClass_useSimilar_fromImport(); + + @failingTest + @override + test_undefinedClass_useSimilar_fromThisLibrary() => + super.test_undefinedClass_useSimilar_fromThisLibrary(); + + @failingTest + @override + test_undefinedFunction_create_bottomArgument() => + super.test_undefinedFunction_create_bottomArgument(); + + @failingTest + @override + test_undefinedFunction_create_duplicateArgumentNames() => + super.test_undefinedFunction_create_duplicateArgumentNames(); + + @failingTest + @override + test_undefinedFunction_create_dynamicArgument() => + super.test_undefinedFunction_create_dynamicArgument(); + + @failingTest + @override + test_undefinedFunction_create_dynamicReturnType() => + super.test_undefinedFunction_create_dynamicReturnType(); + + @failingTest + @override + test_undefinedFunction_create_fromFunction() => + super.test_undefinedFunction_create_fromFunction(); + + @failingTest + @override + test_undefinedFunction_create_fromMethod() => + super.test_undefinedFunction_create_fromMethod(); + + @failingTest + @override + test_undefinedFunction_create_generic_BAD() => + super.test_undefinedFunction_create_generic_BAD(); + + @failingTest + @override + test_undefinedFunction_create_generic_OK() => + super.test_undefinedFunction_create_generic_OK(); + + @failingTest + @override + test_undefinedFunction_create_importType() => + super.test_undefinedFunction_create_importType(); + + @failingTest + @override + test_undefinedFunction_create_nullArgument() => + super.test_undefinedFunction_create_nullArgument(); + + @failingTest + @override + test_undefinedFunction_create_returnType_bool_expressions() => + super.test_undefinedFunction_create_returnType_bool_expressions(); + + @failingTest + @override + test_undefinedFunction_create_returnType_bool_statements() => + super.test_undefinedFunction_create_returnType_bool_statements(); + + @failingTest + @override + test_undefinedFunction_create_returnType_fromAssignment_eq() => + super.test_undefinedFunction_create_returnType_fromAssignment_eq(); + + @failingTest + @override + test_undefinedFunction_create_returnType_fromAssignment_plusEq() => + super.test_undefinedFunction_create_returnType_fromAssignment_plusEq(); + + @failingTest + @override + test_undefinedFunction_create_returnType_fromBinary_right() => + super.test_undefinedFunction_create_returnType_fromBinary_right(); + + @failingTest + @override + test_undefinedFunction_create_returnType_fromInitializer() => + super.test_undefinedFunction_create_returnType_fromInitializer(); + + @failingTest + @override + test_undefinedFunction_create_returnType_fromInvocationArgument() => + super.test_undefinedFunction_create_returnType_fromInvocationArgument(); + + @failingTest + @override + test_undefinedFunction_create_returnType_fromReturn() => + super.test_undefinedFunction_create_returnType_fromReturn(); + + @failingTest + @override + test_undefinedFunction_create_returnType_void() => + super.test_undefinedFunction_create_returnType_void(); + + @failingTest + @override + test_undefinedFunction_useSimilar_fromImport() => + super.test_undefinedFunction_useSimilar_fromImport(); + + @failingTest + @override + test_undefinedFunction_useSimilar_prefixed_fromImport() => + super.test_undefinedFunction_useSimilar_prefixed_fromImport(); + + @failingTest + @override + test_undefinedFunction_useSimilar_thisLibrary() => + super.test_undefinedFunction_useSimilar_thisLibrary(); + + @failingTest + @override + test_undefinedGetter_useSimilar_unqualified() => + super.test_undefinedGetter_useSimilar_unqualified(); + + @failingTest + @override + test_undefinedMethod_create_BAD_targetIsEnum() => + super.test_undefinedMethod_create_BAD_targetIsEnum(); + + @failingTest + @override + test_undefinedMethod_create_generic_OK_local() => + super.test_undefinedMethod_create_generic_OK_local(); + + @failingTest + @override + test_undefinedMethod_createUnqualified_duplicateArgumentNames() => + super.test_undefinedMethod_createUnqualified_duplicateArgumentNames(); + + @failingTest + @override + test_undefinedMethod_createUnqualified_parameters() => + super.test_undefinedMethod_createUnqualified_parameters(); + + @failingTest + @override + test_undefinedMethod_createUnqualified_parameters_named() => + super.test_undefinedMethod_createUnqualified_parameters_named(); + + @failingTest + @override + test_undefinedMethod_createUnqualified_returnType() => + super.test_undefinedMethod_createUnqualified_returnType(); + + @failingTest + @override + test_undefinedMethod_parameterType_differentPrefixInTargetUnit() => + super.test_undefinedMethod_parameterType_differentPrefixInTargetUnit(); + + @failingTest + @override + test_undefinedMethod_parameterType_inTargetUnit() => + super.test_undefinedMethod_parameterType_inTargetUnit(); + + @failingTest + @override + test_undefinedMethod_useSimilar_unqualified_superClass() => + super.test_undefinedMethod_useSimilar_unqualified_superClass(); + + @failingTest + @override + test_undefinedMethod_useSimilar_unqualified_thisClass() => + super.test_undefinedMethod_useSimilar_unqualified_thisClass(); + + @failingTest + @override + test_undefinedSetter_useSimilar_unqualified() => + super.test_undefinedSetter_useSimilar_unqualified(); + + @failingTest + @override + test_useImportPrefix_withClass() => super.test_useImportPrefix_withClass(); + + @failingTest + @override + test_useImportPrefix_withTopLevelVariable() => + super.test_useImportPrefix_withTopLevelVariable(); +} + @reflectiveTest class LintFixTest extends BaseFixProcessorTest { AnalysisError error; @@ -8402,6 +9505,47 @@ Function finalVar() { } } +@reflectiveTest +class LintFixTest_UseCFE extends LintFixTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_lint_addMissingOverride_method_with_doc_comment_and_metadata() => + super.test_lint_addMissingOverride_method_with_doc_comment_and_metadata(); + + @failingTest + @override + test_replaceWithLiteral_linkedHashMap_withCommentsInGeneric() => + super.test_replaceWithLiteral_linkedHashMap_withCommentsInGeneric(); + + @failingTest + @override + test_replaceWithLiteral_linkedHashMap_withDynamicGenerics() => + super.test_replaceWithLiteral_linkedHashMap_withDynamicGenerics(); + + @failingTest + @override + test_replaceWithLiteral_linkedHashMap_withGeneric() => + super.test_replaceWithLiteral_linkedHashMap_withGeneric(); + + @failingTest + @override + test_replaceWithLiteral_linkedHashMap_withoutGeneric() => + super.test_replaceWithLiteral_linkedHashMap_withoutGeneric(); + + @failingTest + @override + test_replaceWithLiteral_map_withGeneric() => + super.test_replaceWithLiteral_map_withGeneric(); + + @failingTest + @override + test_replaceWithLiteral_map_withoutGeneric() => + super.test_replaceWithLiteral_map_withoutGeneric(); +} + class _DartFixContextImpl implements DartFixContext { @override final ResourceProvider resourceProvider; diff --git a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart index 24f5ed80ebdd8..fb5c715d79849 100644 --- a/pkg/analysis_server/test/services/correction/name_suggestion_test.dart +++ b/pkg/analysis_server/test/services/correction/name_suggestion_test.dart @@ -13,6 +13,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(VariableNameSuggestionTest); + defineReflectiveTests(VariableNameSuggestionTest_UseCFE); }); } @@ -102,6 +103,26 @@ main() { unorderedEquals(['s'])); } + test_forExpression_inBuildMethod() async { + await resolveTestUnit(''' +class A { + void build() { + List l = new List(); + } +} +'''); + var excluded = new Set.from([]); + var expr = findNodeAtString('new List'); + expect( + getVariableNameSuggestionsForExpression(null, expr, excluded, + isMethod: false), + unorderedEquals(['list'])); + expect( + getVariableNameSuggestionsForExpression(null, expr, excluded, + isMethod: true), + unorderedEquals(['buildList'])); + } + test_forExpression_indexExpression_endsWithE() async { await resolveTestUnit(''' main() { @@ -226,26 +247,6 @@ main(p) { unorderedEquals(['sortedNodes', 'nodes'])); } - test_forExpression_inBuildMethod() async { - await resolveTestUnit(''' -class A { - void build() { - List l = new List(); - } -} -'''); - var excluded = new Set.from([]); - var expr = findNodeAtString('new List'); - expect( - getVariableNameSuggestionsForExpression(null, expr, excluded, - isMethod: false), - unorderedEquals(['list'])); - expect( - getVariableNameSuggestionsForExpression(null, expr, excluded, - isMethod: true), - unorderedEquals(['buildList'])); - } - test_forExpression_methodInvocation_noPrefix() async { await resolveTestUnit(''' main(p) { @@ -367,3 +368,29 @@ main(p) { } } } + +@reflectiveTest +class VariableNameSuggestionTest_UseCFE extends VariableNameSuggestionTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_forExpression_indexExpression_endsWithE() => + super.test_forExpression_indexExpression_endsWithE(); + + @failingTest + @override + test_forExpression_instanceCreation() => + super.test_forExpression_instanceCreation(); + + @failingTest + @override + test_forExpression_invocationArgument_optional() => + super.test_forExpression_invocationArgument_optional(); + + @failingTest + @override + test_forExpression_invocationArgument_positional() => + super.test_forExpression_invocationArgument_positional(); +} diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart index 9576897406965..15de1b9248db6 100644 --- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart +++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart @@ -17,6 +17,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(OrganizeDirectivesTest); + defineReflectiveTests(OrganizeDirectivesTest_UseCFE); }); } @@ -340,3 +341,36 @@ import 'package:product2.client/entity.dart'; testErrors = result.errors; } } + +@reflectiveTest +class OrganizeDirectivesTest_UseCFE extends OrganizeDirectivesTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_remove_unresolvedDirectives() => + super.test_remove_unresolvedDirectives(); + + @failingTest + @override + test_remove_unusedImports() => super.test_remove_unusedImports(); + + @failingTest + @override + test_remove_unusedImports_hasUnresolvedError() => + super.test_remove_unusedImports_hasUnresolvedError(); + + @failingTest + @override + test_sort() => super.test_sort(); + + @failingTest + @override + test_sort_hasComments() => super.test_sort_hasComments(); + + @failingTest + @override + test_sort_imports_packageAndPath() => + super.test_sort_imports_packageAndPath(); +} diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart index 341cb3b315a64..a299f939b1ed5 100644 --- a/pkg/analysis_server/test/services/correction/sort_members_test.dart +++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart @@ -15,6 +15,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(SortMembersTest); + defineReflectiveTests(SortMembersTest_UseCFE); }); } @@ -808,3 +809,9 @@ int c; testUnit = result.unit; } } + +@reflectiveTest +class SortMembersTest_UseCFE extends SortMembersTest { + @override + bool get useCFE => true; +} diff --git a/pkg/analysis_server/test/services/correction/status_test.dart b/pkg/analysis_server/test/services/correction/status_test.dart index cce27cd697928..ca5e82b8267bf 100644 --- a/pkg/analysis_server/test/services/correction/status_test.dart +++ b/pkg/analysis_server/test/services/correction/status_test.dart @@ -18,7 +18,9 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RefactoringLocationTest); + defineReflectiveTests(RefactoringLocationTest_UseCFE); defineReflectiveTests(RefactoringStatusTest); + defineReflectiveTests(RefactoringStatusTest_UseCFE); }); } @@ -81,6 +83,12 @@ main() { } } +@reflectiveTest +class RefactoringLocationTest_UseCFE extends RefactoringLocationTest { + @override + bool get useCFE => true; +} + @reflectiveTest class RefactoringStatusTest { void test_addError() { @@ -233,3 +241,9 @@ class RefactoringStatusTest { expect(refactoringStatus.message, 'msg'); } } + +@reflectiveTest +class RefactoringStatusTest_UseCFE extends RefactoringStatusTest { + @override + bool get useCFE => true; +} diff --git a/pkg/analysis_server/test/services/correction/util_test.dart b/pkg/analysis_server/test/services/correction/util_test.dart index 3e1981c46d083..cba58c51bdbd0 100644 --- a/pkg/analysis_server/test/services/correction/util_test.dart +++ b/pkg/analysis_server/test/services/correction/util_test.dart @@ -16,6 +16,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(UtilTest); + defineReflectiveTests(UtilTest_UseCFE); }); } @@ -305,6 +306,12 @@ import 'package:ddd/ddd.dart'; } } +@reflectiveTest +class UtilTest_UseCFE extends UtilTest { + @override + bool get useCFE => true; +} + class _SourceMock implements Source { @override final String fullName; diff --git a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart index 6702055015707..66ed449a841b6 100644 --- a/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart +++ b/pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart @@ -15,6 +15,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(ConvertGetterToMethodTest); + defineReflectiveTests(ConvertGetterToMethodTest_UseCFE); }); } @@ -161,3 +162,21 @@ main() { _createRefactoringForElement(element); } } + +@reflectiveTest +class ConvertGetterToMethodTest_UseCFE extends ConvertGetterToMethodTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_change_function() => super.test_change_function(); + + @failingTest + @override + test_change_method() => super.test_change_method(); + + @failingTest + @override + test_change_multipleFiles() => super.test_change_multipleFiles(); +} diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart index 60f38f87328f3..28b9b71ce95ca 100644 --- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart +++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart @@ -17,6 +17,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(ConvertMethodToGetterTest); + defineReflectiveTests(ConvertMethodToGetterTest_UseCFE); }); } @@ -213,3 +214,21 @@ void test() {} _createRefactoringForElement(element); } } + +@reflectiveTest +class ConvertMethodToGetterTest_UseCFE extends ConvertMethodToGetterTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_change_function() => super.test_change_function(); + + @failingTest + @override + test_change_method() => super.test_change_method(); + + @failingTest + @override + test_change_multipleFiles() => super.test_change_multipleFiles(); +} diff --git a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart index 8eb5778232b1d..aa9075066f596 100644 --- a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart +++ b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart @@ -17,6 +17,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(ExtractLocalTest); + defineReflectiveTests(ExtractLocalTest_UseCFE); }); } @@ -1343,3 +1344,28 @@ main() { return subExpressions; } } + +@reflectiveTest +class ExtractLocalTest_UseCFE extends ExtractLocalTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_guessNames_singleExpression() => + super.test_guessNames_singleExpression(); + + @failingTest + @override + test_occurrences_differentVariable() => + super.test_occurrences_differentVariable(); + + @failingTest + @override + test_singleExpression_hasParseError_expectedSemicolon() => + super.test_singleExpression_hasParseError_expectedSemicolon(); + + @failingTest + @override + test_stringLiteral_whole() => super.test_stringLiteral_whole(); +} diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart index 59f1a2148b398..743d87f482308 100644 --- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart +++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart @@ -16,6 +16,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(ExtractMethodTest); + defineReflectiveTests(ExtractMethodTest_UseCFE); }); } @@ -2933,3 +2934,31 @@ Future newFuture() => null; }).toList(); } } + +@reflectiveTest +class ExtractMethodTest_UseCFE extends ExtractMethodTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_bad_conflict_topLevel_willHideInheritedMemberUsage() => + super.test_bad_conflict_topLevel_willHideInheritedMemberUsage(); + + @failingTest + @override + test_closure_atArgumentName() => super.test_closure_atArgumentName(); + + @failingTest + @override + test_closure_atParameters() => super.test_closure_atParameters(); + + @failingTest + @override + test_names_singleExpression() => super.test_names_singleExpression(); + + @failingTest + @override + test_statements_parameters_localFunction() => + super.test_statements_parameters_localFunction(); +} diff --git a/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart b/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart index 55a9cff1c5287..071fc769b552a 100644 --- a/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart +++ b/pkg/analysis_server/test/services/refactoring/extract_widget_test.dart @@ -16,6 +16,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(ExtractWidgetTest); + defineReflectiveTests(ExtractWidgetTest_UseCFE); }); } @@ -1254,3 +1255,59 @@ void main() { _createRefactoring(offset, 0); } } + +@reflectiveTest +class ExtractWidgetTest_UseCFE extends ExtractWidgetTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_invocation_otherClass() => super.test_invocation_otherClass(); + + @failingTest + @override + test_method_parameters() => super.test_method_parameters(); + + @failingTest + @override + test_method_parameters_named() => super.test_method_parameters_named(); + + @failingTest + @override + test_parameters_field_read_enclosingClass() => + super.test_parameters_field_read_enclosingClass(); + + @failingTest + @override + test_parameters_field_read_otherClass() => + super.test_parameters_field_read_otherClass(); + + @failingTest + @override + test_parameters_field_write_otherClass() => + super.test_parameters_field_write_otherClass(); + + @failingTest + @override + test_parameters_local_read_enclosingScope() => + super.test_parameters_local_read_enclosingScope(); + + @failingTest + @override + test_parameters_private() => super.test_parameters_private(); + + @failingTest + @override + test_parameters_private_conflictWithPublic() => + super.test_parameters_private_conflictWithPublic(); + + @failingTest + @override + test_parameters_readField_readLocal() => + super.test_parameters_readField_readLocal(); + + @failingTest + @override + test_statements() => super.test_statements(); +} diff --git a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart index 3c224eea17078..9da3c394e8b97 100644 --- a/pkg/analysis_server/test/services/refactoring/inline_local_test.dart +++ b/pkg/analysis_server/test/services/refactoring/inline_local_test.dart @@ -14,6 +14,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(InlineLocalTest); + defineReflectiveTests(InlineLocalTest_UseCFE); }); } @@ -637,3 +638,142 @@ main() { new InlineLocalRefactoring(searchEngine, astProvider, testUnit, offset); } } + +@reflectiveTest +class InlineLocalTest_UseCFE extends InlineLocalTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_access() => super.test_access(); + + @failingTest + @override + test_bad_selectionVariable_hasAssignments_1() => + super.test_bad_selectionVariable_hasAssignments_1(); + + @failingTest + @override + test_bad_selectionVariable_hasAssignments_2() => + super.test_bad_selectionVariable_hasAssignments_2(); + + @failingTest + @override + test_OK_cascade_intoCascade() => super.test_OK_cascade_intoCascade(); + + @failingTest + @override + test_OK_cascade_intoNotCascade() => super.test_OK_cascade_intoNotCascade(); + + @failingTest + @override + test_OK_inSwitchCase() => super.test_OK_inSwitchCase(); + + @failingTest + @override + test_OK_intoStringInterpolation_binaryExpression() => + super.test_OK_intoStringInterpolation_binaryExpression(); + + @failingTest + @override + test_OK_intoStringInterpolation_simpleIdentifier() => + super.test_OK_intoStringInterpolation_simpleIdentifier(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_differentQuotes() => + super.test_OK_intoStringInterpolation_string_differentQuotes(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_doubleQuotes() => + super.test_OK_intoStringInterpolation_string_doubleQuotes(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_multiLineIntoMulti_leadingSpaces() => super + .test_OK_intoStringInterpolation_string_multiLineIntoMulti_leadingSpaces(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_multiLineIntoMulti_unixEOL() => + super.test_OK_intoStringInterpolation_string_multiLineIntoMulti_unixEOL(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_multiLineIntoMulti_windowsEOL() => super + .test_OK_intoStringInterpolation_string_multiLineIntoMulti_windowsEOL(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_multiLineIntoSingle() => + super.test_OK_intoStringInterpolation_string_multiLineIntoSingle(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_raw() => + super.test_OK_intoStringInterpolation_string_raw(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_singleLineIntoMulti_doubleQuotes() => super + .test_OK_intoStringInterpolation_string_singleLineIntoMulti_doubleQuotes(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_singleLineIntoMulti_singleQuotes() => super + .test_OK_intoStringInterpolation_string_singleLineIntoMulti_singleQuotes(); + + @failingTest + @override + test_OK_intoStringInterpolation_string_singleQuotes() => + super.test_OK_intoStringInterpolation_string_singleQuotes(); + + @failingTest + @override + test_OK_intoStringInterpolation_stringInterpolation() => + super.test_OK_intoStringInterpolation_stringInterpolation(); + + @failingTest + @override + test_OK_keepNextCommentedLine() => super.test_OK_keepNextCommentedLine(); + + @failingTest + @override + test_OK_oneUsage() => super.test_OK_oneUsage(); + + @failingTest + @override + test_OK_parenthesis_decrement_intoNegate() => + super.test_OK_parenthesis_decrement_intoNegate(); + + @failingTest + @override + test_OK_parenthesis_instanceCreation_intoList() => + super.test_OK_parenthesis_instanceCreation_intoList(); + + @failingTest + @override + test_OK_parenthesis_intoIndexExpression_index() => + super.test_OK_parenthesis_intoIndexExpression_index(); + + @failingTest + @override + test_OK_parenthesis_intoParenthesizedExpression() => + super.test_OK_parenthesis_intoParenthesizedExpression(); + + @failingTest + @override + test_OK_parenthesis_negate_intoNegate() => + super.test_OK_parenthesis_negate_intoNegate(); + + @failingTest + @override + test_OK_parenthesis_plus_intoMultiply() => + super.test_OK_parenthesis_plus_intoMultiply(); + + @failingTest + @override + test_OK_twoUsages() => super.test_OK_twoUsages(); +} diff --git a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart index 64c50e0895491..38f8626e052ca 100644 --- a/pkg/analysis_server/test/services/refactoring/inline_method_test.dart +++ b/pkg/analysis_server/test/services/refactoring/inline_method_test.dart @@ -17,6 +17,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(InlineMethodTest); + defineReflectiveTests(InlineMethodTest_UseCFE); }); } @@ -1759,3 +1760,326 @@ main(bool p, bool p2, bool p3) { searchEngine, astProvider, testUnit, offset); } } + +@reflectiveTest +class InlineMethodTest_UseCFE extends InlineMethodTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_access_FunctionElement() => super.test_access_FunctionElement(); + + @failingTest + @override + test_access_MethodElement() => super.test_access_MethodElement(); + + @failingTest + @override + test_bad_async_intoSyncStar() => super.test_bad_async_intoSyncStar(); + + @failingTest + @override + test_bad_async_targetIsSync_doesNotReturnFuture() => + super.test_bad_async_targetIsSync_doesNotReturnFuture(); + + @failingTest + @override + test_bad_cascadeInvocation() => super.test_bad_cascadeInvocation(); + + @failingTest + @override + test_bad_deleteSource_inlineOne() => super.test_bad_deleteSource_inlineOne(); + + @failingTest + @override + test_bad_reference_toClassMethod() => + super.test_bad_reference_toClassMethod(); + + @failingTest + @override + test_bad_severalReturns() => super.test_bad_severalReturns(); + + @failingTest + @override + test_cascadeInCascade() => super.test_cascadeInCascade(); + + @failingTest + @override + test_fieldAccessor_getter() => super.test_fieldAccessor_getter(); + + @failingTest + @override + test_fieldAccessor_getter_PropertyAccess() => + super.test_fieldAccessor_getter_PropertyAccess(); + + @failingTest + @override + test_fieldAccessor_setter() => super.test_fieldAccessor_setter(); + + @failingTest + @override + test_fieldAccessor_setter_PropertyAccess() => + super.test_fieldAccessor_setter_PropertyAccess(); + + @failingTest + @override + test_function_expressionFunctionBody() => + super.test_function_expressionFunctionBody(); + + @failingTest + @override + test_function_hasReturn_assign() => super.test_function_hasReturn_assign(); + + @failingTest + @override + test_function_hasReturn_hasReturnType() => + super.test_function_hasReturn_hasReturnType(); + + @failingTest + @override + test_function_hasReturn_noVars_oneUsage() => + super.test_function_hasReturn_noVars_oneUsage(); + + @failingTest + @override + test_function_multilineString() => super.test_function_multilineString(); + + @failingTest + @override + test_function_noReturn_hasVars_hasConflict_fieldSuperClass() => + super.test_function_noReturn_hasVars_hasConflict_fieldSuperClass(); + + @failingTest + @override + test_function_noReturn_hasVars_hasConflict_fieldThisClass() => + super.test_function_noReturn_hasVars_hasConflict_fieldThisClass(); + + @failingTest + @override + test_function_noReturn_hasVars_hasConflict_localAfter() => + super.test_function_noReturn_hasVars_hasConflict_localAfter(); + + @failingTest + @override + test_function_noReturn_hasVars_hasConflict_localBefore() => + super.test_function_noReturn_hasVars_hasConflict_localBefore(); + + @failingTest + @override + test_function_noReturn_hasVars_noConflict() => + super.test_function_noReturn_hasVars_noConflict(); + + @failingTest + @override + test_function_noReturn_noVars_oneUsage() => + super.test_function_noReturn_noVars_oneUsage(); + + @failingTest + @override + test_function_noReturn_noVars_useIndentation() => + super.test_function_noReturn_noVars_useIndentation(); + + @failingTest + @override + test_function_noReturn_voidReturnType() => + super.test_function_noReturn_voidReturnType(); + + @failingTest + @override + test_function_notStatement_oneStatement_assign() => + super.test_function_notStatement_oneStatement_assign(); + + @failingTest + @override + test_function_notStatement_oneStatement_variableDeclaration() => + super.test_function_notStatement_oneStatement_variableDeclaration(); + + @failingTest + @override + test_function_notStatement_severalStatements() => + super.test_function_notStatement_severalStatements(); + + @failingTest + @override + test_function_notStatement_zeroStatements() => + super.test_function_notStatement_zeroStatements(); + + @failingTest + @override + test_function_singleStatement() => super.test_function_singleStatement(); + + @failingTest + @override + test_getter_async_targetIsAsync() => super.test_getter_async_targetIsAsync(); + + @failingTest + @override + test_getter_async_targetIsAsyncStar() => + super.test_getter_async_targetIsAsyncStar(); + + @failingTest + @override + test_getter_async_targetIsSync() => super.test_getter_async_targetIsSync(); + + @failingTest + @override + test_getter_async_targetIsSync2() => super.test_getter_async_targetIsSync2(); + + @failingTest + @override + test_getter_classMember_instance() => + super.test_getter_classMember_instance(); + + @failingTest + @override + test_getter_classMember_static() => super.test_getter_classMember_static(); + + @failingTest + @override + test_getter_topLevel() => super.test_getter_topLevel(); + + @failingTest + @override + test_initialMode_all() => super.test_initialMode_all(); + + @failingTest + @override + test_initialMode_single() => super.test_initialMode_single(); + + @failingTest + @override + test_method_async() => super.test_method_async(); + + @failingTest + @override + test_method_async2() => super.test_method_async2(); + + @failingTest + @override + test_method_emptyBody() => super.test_method_emptyBody(); + + @failingTest + @override + test_method_fieldInstance() => super.test_method_fieldInstance(); + + @failingTest + @override + test_method_fieldStatic() => super.test_method_fieldStatic(); + + @failingTest + @override + test_method_fieldStatic_sameClass() => + super.test_method_fieldStatic_sameClass(); + + @failingTest + @override + test_method_methodInstance() => super.test_method_methodInstance(); + + @failingTest + @override + test_method_methodStatic() => super.test_method_methodStatic(); + + @failingTest + @override + test_method_singleStatement() => super.test_method_singleStatement(); + + @failingTest + @override + test_method_this() => super.test_method_this(); + + @failingTest + @override + test_method_unqualifiedInvocation() => + super.test_method_unqualifiedInvocation(); + + @failingTest + @override + test_namedArgument_inBody() => super.test_namedArgument_inBody(); + + @failingTest + @override + test_namedArguments() => super.test_namedArguments(); + + @failingTest + @override + test_noArgument_named_hasDefault() => + super.test_noArgument_named_hasDefault(); + + @failingTest + @override + test_noArgument_positional_hasDefault() => + super.test_noArgument_positional_hasDefault(); + + @failingTest + @override + test_noArgument_positional_noDefault() => + super.test_noArgument_positional_noDefault(); + + @failingTest + @override + test_noArgument_required() => super.test_noArgument_required(); + + @failingTest + @override + test_reference_expressionBody() => super.test_reference_expressionBody(); + + @failingTest + @override + test_reference_noStatement() => super.test_reference_noStatement(); + + @failingTest + @override + test_reference_toLocal() => super.test_reference_toLocal(); + + @failingTest + @override + test_reference_toTopLevel() => super.test_reference_toTopLevel(); + + @failingTest + @override + test_removeEmptyLinesBefore_method() => + super.test_removeEmptyLinesBefore_method(); + + @failingTest + @override + test_setter_classMember_instance() => + super.test_setter_classMember_instance(); + + @failingTest + @override + test_setter_topLevel() => super.test_setter_topLevel(); + + @failingTest + @override + test_singleExpression_oneUsage() => super.test_singleExpression_oneUsage(); + + @failingTest + @override + test_singleExpression_oneUsage_keepMethod() => + super.test_singleExpression_oneUsage_keepMethod(); + + @failingTest + @override + test_singleExpression_twoUsages() => super.test_singleExpression_twoUsages(); + + @failingTest + @override + test_singleExpression_twoUsages_inlineOne() => + super.test_singleExpression_twoUsages_inlineOne(); + + @failingTest + @override + test_singleExpression_wrapIntoParenthesized_alreadyInMethod() => + super.test_singleExpression_wrapIntoParenthesized_alreadyInMethod(); + + @failingTest + @override + test_singleExpression_wrapIntoParenthesized_asNeeded() => + super.test_singleExpression_wrapIntoParenthesized_asNeeded(); + + @failingTest + @override + test_singleExpression_wrapIntoParenthesized_bool() => + super.test_singleExpression_wrapIntoParenthesized_bool(); +} diff --git a/pkg/analysis_server/test/services/refactoring/move_file_test.dart b/pkg/analysis_server/test/services/refactoring/move_file_test.dart index 0faf26abadac6..0c68a70fb6af3 100644 --- a/pkg/analysis_server/test/services/refactoring/move_file_test.dart +++ b/pkg/analysis_server/test/services/refactoring/move_file_test.dart @@ -13,6 +13,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(MoveFileTest); + defineReflectiveTests(MoveFileTest_UseCFE); }); } @@ -249,3 +250,18 @@ part '22/new_name.dart'; fail(message); } } + +@reflectiveTest +class MoveFileTest_UseCFE extends MoveFileTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_file_containing_imports_exports_parts() => + callFailingTest(super.test_file_containing_imports_exports_parts()); + + @failingTest + @override + test_file_referenced_by_part() => super.test_file_referenced_by_part(); +} diff --git a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart index 9c3f157d4373a..ab5843cbcde5d 100644 --- a/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart +++ b/pkg/analysis_server/test/services/refactoring/naming_conventions_test.dart @@ -14,6 +14,7 @@ import 'abstract_refactoring.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(NamingConventionsTest); + defineReflectiveTests(NamingConventionsTest_UseCFE); }); } @@ -34,6 +35,12 @@ class NamingConventionsTest extends RefactoringTest { expectedMessage: "Class name must not be empty."); } + void test_validateClassName_invalidCharacter() { + assertRefactoringStatus( + validateClassName("-NewName"), RefactoringProblemSeverity.FATAL, + expectedMessage: "Class name must not contain '-'."); + } + void test_validateClassName_leadingBlanks() { assertRefactoringStatus( validateClassName(" NewName"), RefactoringProblemSeverity.FATAL, @@ -52,12 +59,6 @@ class NamingConventionsTest extends RefactoringTest { expectedMessage: "Class name should start with an uppercase letter."); } - void test_validateClassName_invalidCharacter() { - assertRefactoringStatus( - validateClassName("-NewName"), RefactoringProblemSeverity.FATAL, - expectedMessage: "Class name must not contain '-'."); - } - void test_validateClassName_null() { assertRefactoringStatus( validateClassName(null), RefactoringProblemSeverity.FATAL, @@ -281,6 +282,12 @@ class NamingConventionsTest extends RefactoringTest { expectedMessage: "Function type alias name must not be empty."); } + void test_validateFunctionTypeAliasName_invalidCharacters() { + assertRefactoringStatus(validateFunctionTypeAliasName("New-Name"), + RefactoringProblemSeverity.FATAL, + expectedMessage: "Function type alias name must not contain \'-\'."); + } + void test_validateFunctionTypeAliasName_leadingBlanks() { assertRefactoringStatus(validateFunctionTypeAliasName(" NewName"), RefactoringProblemSeverity.FATAL, @@ -301,12 +308,6 @@ class NamingConventionsTest extends RefactoringTest { "Function type alias name should start with an uppercase letter."); } - void test_validateFunctionTypeAliasName_invalidCharacters() { - assertRefactoringStatus(validateFunctionTypeAliasName("New-Name"), - RefactoringProblemSeverity.FATAL, - expectedMessage: "Function type alias name must not contain \'-\'."); - } - void test_validateFunctionTypeAliasName_null() { assertRefactoringStatus( validateFunctionTypeAliasName(null), RefactoringProblemSeverity.FATAL, @@ -759,3 +760,9 @@ class NamingConventionsTest extends RefactoringTest { expectedMessage: 'Avoid using built-in identifiers as names.'); } } + +@reflectiveTest +class NamingConventionsTest_UseCFE extends NamingConventionsTest { + @override + bool get useCFE => true; +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart index 00006c577f032..423668b0c5c5c 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_class_member_test.dart @@ -13,6 +13,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameClassMemberTest); + defineReflectiveTests(RenameClassMemberTest_UseCFE); }); } @@ -917,3 +918,128 @@ class A { '''); } } + +@reflectiveTest +class RenameClassMemberTest_UseCFE extends RenameClassMemberTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_checkFinalConditions_classNameConflict_subClass() => + super.test_checkFinalConditions_classNameConflict_subClass(); + + @failingTest + @override + test_checkFinalConditions_classNameConflict_superClass() => + super.test_checkFinalConditions_classNameConflict_superClass(); + + @failingTest + @override + test_checkFinalConditions_OK_dropSuffix() => + super.test_checkFinalConditions_OK_dropSuffix(); + + @failingTest + @override + test_checkFinalConditions_OK_noShadow_nullVisibleRange() => + super.test_checkFinalConditions_OK_noShadow_nullVisibleRange(); + + @failingTest + @override + test_checkFinalConditions_publicToPrivate_usedInOtherLibrary() => + super.test_checkFinalConditions_publicToPrivate_usedInOtherLibrary(); + + @failingTest + @override + test_checkFinalConditions_shadowed_byLocalFunction_inSameClass() => + super.test_checkFinalConditions_shadowed_byLocalFunction_inSameClass(); + + @failingTest + @override + test_checkFinalConditions_shadowed_byLocalVariable_inSameClass() => + super.test_checkFinalConditions_shadowed_byLocalVariable_inSameClass(); + + @failingTest + @override + test_checkFinalConditions_shadowed_byLocalVariable_inSubClass() => + super.test_checkFinalConditions_shadowed_byLocalVariable_inSubClass(); + + @failingTest + @override + test_checkFinalConditions_shadowed_byLocalVariable_OK_qualifiedReference() => + super + .test_checkFinalConditions_shadowed_byLocalVariable_OK_qualifiedReference(); + + @failingTest + @override + test_checkFinalConditions_shadowed_byParameter_inSameClass() => + super.test_checkFinalConditions_shadowed_byParameter_inSameClass(); + + @failingTest + @override + test_checkFinalConditions_shadowedBySub_MethodElement() => + super.test_checkFinalConditions_shadowedBySub_MethodElement(); + + @failingTest + @override + test_checkFinalConditions_shadowsSuper_FieldElement() => + super.test_checkFinalConditions_shadowsSuper_FieldElement(); + + @failingTest + @override + test_createChange_FieldElement() => super.test_createChange_FieldElement(); + + @failingTest + @override + test_createChange_FieldElement_constructorFieldInitializer() => + super.test_createChange_FieldElement_constructorFieldInitializer(); + + @failingTest + @override + test_createChange_FieldElement_fieldFormalParameter() => + super.test_createChange_FieldElement_fieldFormalParameter(); + + @failingTest + @override + test_createChange_FieldElement_fieldFormalParameter_named() => + super.test_createChange_FieldElement_fieldFormalParameter_named(); + + @failingTest + @override + test_createChange_FieldElement_invocation() => + super.test_createChange_FieldElement_invocation(); + + @failingTest + @override + test_createChange_MethodElement() => super.test_createChange_MethodElement(); + + @failingTest + @override + test_createChange_MethodElement_potential() => + super.test_createChange_MethodElement_potential(); + + @failingTest + @override + test_createChange_MethodElement_potential_inPubCache() => + super.test_createChange_MethodElement_potential_inPubCache(); + + @failingTest + @override + test_createChange_MethodElement_potential_private_otherLibrary() => + super.test_createChange_MethodElement_potential_private_otherLibrary(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_getter() => + super.test_createChange_PropertyAccessorElement_getter(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_setter() => + super.test_createChange_PropertyAccessorElement_setter(); + + @failingTest + @override + test_createChange_TypeParameterElement() => + super.test_createChange_TypeParameterElement(); +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart index 2f0f4a3f0a9a3..1c318b8e0af09 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart @@ -15,6 +15,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameConstructorTest); + defineReflectiveTests(RenameConstructorTest_UseCFE); }); } @@ -247,3 +248,26 @@ main() { createRenameRefactoringForElement(element); } } + +@reflectiveTest +class RenameConstructorTest_UseCFE extends RenameConstructorTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_createChange_add() => super.test_createChange_add(); + + @failingTest + @override + test_createChange_add_toSynthetic() => + super.test_createChange_add_toSynthetic(); + + @failingTest + @override + test_createChange_change() => super.test_createChange_change(); + + @failingTest + @override + test_createChange_remove() => super.test_createChange_remove(); +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart index ed29086e76ba3..59294902a1160 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_import_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_import_test.dart @@ -12,6 +12,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameImportTest); + defineReflectiveTests(RenameImportTest_UseCFE); }); } @@ -228,3 +229,42 @@ main() { createRenameRefactoringForElement(directive.element); } } + +@reflectiveTest +class RenameImportTest_UseCFE extends RenameImportTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_createChange_add() => super.test_createChange_add(); + + @failingTest + @override + test_createChange_add_interpolationExpression_hasCurlyBrackets() => + super.test_createChange_add_interpolationExpression_hasCurlyBrackets(); + + @failingTest + @override + test_createChange_add_interpolationExpression_noCurlyBrackets() => + super.test_createChange_add_interpolationExpression_noCurlyBrackets(); + + @failingTest + @override + test_createChange_change_className() => + super.test_createChange_change_className(); + + @failingTest + @override + test_createChange_change_function() => + super.test_createChange_change_function(); + + @failingTest + @override + test_createChange_change_onPrefixElement() => + super.test_createChange_change_onPrefixElement(); + + @failingTest + @override + test_createChange_remove() => super.test_createChange_remove(); +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart index 076ec774931f8..9fe5d67a19332 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_label_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_label_test.dart @@ -11,6 +11,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameLabelTest); + defineReflectiveTests(RenameLabelTest_UseCFE); }); } @@ -81,3 +82,13 @@ test: expect(refactoring.oldName, 'test'); } } + +@reflectiveTest +class RenameLabelTest_UseCFE extends RenameLabelTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_createChange() => super.test_createChange(); +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart index 19d2a4d1af2e2..d0da82be29068 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_library_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_library_test.dart @@ -11,6 +11,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameLibraryTest); + defineReflectiveTests(RenameLibraryTest_UseCFE); }); } @@ -89,3 +90,18 @@ part of the.new.name; createRenameRefactoringForElement(testUnitElement.library); } } + +@reflectiveTest +class RenameLibraryTest_UseCFE extends RenameLibraryTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_createChange() => super.test_createChange(); + + @failingTest + @override + test_createChange_hasWhitespaces() => + super.test_createChange_hasWhitespaces(); +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart index 6b8c27369875c..8148453780f71 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_local_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_local_test.dart @@ -12,6 +12,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameLocalTest); + defineReflectiveTests(RenameLocalTest_UseCFE); }); } @@ -572,3 +573,52 @@ main() { expect(refactoring.oldName, 'test'); } } + +@reflectiveTest +class RenameLocalTest_UseCFE extends RenameLocalTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_checkFinalConditions_shadows_classMember_namedParameter() => + super.test_checkFinalConditions_shadows_classMember_namedParameter(); + + @failingTest + @override + test_createChange_localFunction() => super.test_createChange_localFunction(); + + @failingTest + @override + test_createChange_localFunction_sameNameDifferenceScopes() => + super.test_createChange_localFunction_sameNameDifferenceScopes(); + + @failingTest + @override + test_createChange_localVariable() => super.test_createChange_localVariable(); + + @failingTest + @override + test_createChange_localVariable_sameNameDifferenceScopes() => + super.test_createChange_localVariable_sameNameDifferenceScopes(); + + @failingTest + @override + test_createChange_parameter_named() => + super.test_createChange_parameter_named(); + + @failingTest + @override + test_createChange_parameter_named_inOtherFile() => + super.test_createChange_parameter_named_inOtherFile(); + + @failingTest + @override + test_createChange_parameter_named_updateHierarchy() => + super.test_createChange_parameter_named_updateHierarchy(); + + @failingTest + @override + test_createChange_parameter_optionalPositional() => + super.test_createChange_parameter_optionalPositional(); +} diff --git a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart index e5c22bf31a3e8..96735ca4a4718 100644 --- a/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart +++ b/pkg/analysis_server/test/services/refactoring/rename_unit_member_test.dart @@ -12,6 +12,7 @@ import 'abstract_rename.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(RenameUnitMemberTest); + defineReflectiveTests(RenameUnitMemberTest_UseCFE); }); } @@ -610,3 +611,129 @@ main() { '''); } } + +@reflectiveTest +class RenameUnitMemberTest_UseCFE extends RenameUnitMemberTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_checkFinalConditions_OK_qualifiedSuper_MethodElement() => + super.test_checkFinalConditions_OK_qualifiedSuper_MethodElement(); + + @failingTest + @override + test_checkFinalConditions_publicToPrivate_usedInOtherLibrary() => + super.test_checkFinalConditions_publicToPrivate_usedInOtherLibrary(); + + @failingTest + @override + test_checkFinalConditions_shadowedBy_MethodElement() => + super.test_checkFinalConditions_shadowedBy_MethodElement(); + + @failingTest + @override + test_checkFinalConditions_shadowsInSubClass_importedLib() => + super.test_checkFinalConditions_shadowsInSubClass_importedLib(); + + @failingTest + @override + test_checkFinalConditions_shadowsInSubClass_importedLib_hideCombinator() => + callFailingTest(super + .test_checkFinalConditions_shadowsInSubClass_importedLib_hideCombinator()); + + @failingTest + @override + test_checkFinalConditions_shadowsInSubClass_MethodElement() => + super.test_checkFinalConditions_shadowsInSubClass_MethodElement(); + + @failingTest + @override + test_checkFinalConditions_shadowsInSubClass_notImportedLib() => + super.test_checkFinalConditions_shadowsInSubClass_notImportedLib(); + + @failingTest + @override + test_checkFinalConditions_shadowsInSubClass_notSubClass() => + super.test_checkFinalConditions_shadowsInSubClass_notSubClass(); + + @failingTest + @override + test_createChange_ClassElement() => super.test_createChange_ClassElement(); + + @failingTest + @override + test_createChange_ClassElement_invocation() => + super.test_createChange_ClassElement_invocation(); + + @failingTest + @override + test_createChange_ClassElement_parameterTypeNested() => + super.test_createChange_ClassElement_parameterTypeNested(); + + @failingTest + @override + test_createChange_ClassElement_typeAlias() => + super.test_createChange_ClassElement_typeAlias(); + + @failingTest + @override + test_createChange_FunctionElement() => + super.test_createChange_FunctionElement(); + + @failingTest + @override + test_createChange_FunctionElement_imported() => + super.test_createChange_FunctionElement_imported(); + + @failingTest + @override + test_createChange_FunctionTypeAliasElement() => + super.test_createChange_FunctionTypeAliasElement(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_getter_declaration() => + super.test_createChange_PropertyAccessorElement_getter_declaration(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_getter_usage() => + super.test_createChange_PropertyAccessorElement_getter_usage(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_mix() => + super.test_createChange_PropertyAccessorElement_mix(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_setter_declaration() => + super.test_createChange_PropertyAccessorElement_setter_declaration(); + + @failingTest + @override + test_createChange_PropertyAccessorElement_setter_usage() => + super.test_createChange_PropertyAccessorElement_setter_usage(); + + @failingTest + @override + test_createChange_TopLevelVariableElement_field() => + super.test_createChange_TopLevelVariableElement_field(); + + @failingTest + @override + test_createChange_TopLevelVariableElement_getter() => + super.test_createChange_TopLevelVariableElement_getter(); + + @failingTest + @override + test_createChange_TopLevelVariableElement_mix() => + super.test_createChange_TopLevelVariableElement_mix(); + + @failingTest + @override + test_createChange_TopLevelVariableElement_setter() => + super.test_createChange_TopLevelVariableElement_setter(); +} diff --git a/pkg/analysis_server/test/services/search/element_visitors_test.dart b/pkg/analysis_server/test/services/search/element_visitors_test.dart index ef2c208f71660..1bc572590b335 100644 --- a/pkg/analysis_server/test/services/search/element_visitors_test.dart +++ b/pkg/analysis_server/test/services/search/element_visitors_test.dart @@ -12,6 +12,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(FindElementByNameOffsetTest); + defineReflectiveTests(FindElementByNameOffsetTest_UseCFE); }); } @@ -66,3 +67,9 @@ int ccc; expect(element.name, name); } } + +@reflectiveTest +class FindElementByNameOffsetTest_UseCFE extends FindElementByNameOffsetTest { + @override + bool get useCFE => true; +} diff --git a/pkg/analysis_server/test/services/search/hierarchy_test.dart b/pkg/analysis_server/test/services/search/hierarchy_test.dart index a6827ee066db2..9970bedd36547 100644 --- a/pkg/analysis_server/test/services/search/hierarchy_test.dart +++ b/pkg/analysis_server/test/services/search/hierarchy_test.dart @@ -15,6 +15,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(HierarchyTest); + defineReflectiveTests(HierarchyTest_UseCFE); }); } @@ -449,3 +450,38 @@ class F implements A {} await resolveTestUnit(code); } } + +@reflectiveTest +class HierarchyTest_UseCFE extends HierarchyTest { + @override + bool get useCFE => true; + + @failingTest + @override + test_getHierarchyMembers_fields() => super.test_getHierarchyMembers_fields(); + + @failingTest + @override + test_getHierarchyMembers_methods() => + super.test_getHierarchyMembers_methods(); + + @failingTest + @override + test_getHierarchyMembers_withInterfaces() => + super.test_getHierarchyMembers_withInterfaces(); + + @failingTest + @override + test_getHierarchyNamedParameters() => + super.test_getHierarchyNamedParameters(); + + @failingTest + @override + test_getHierarchyNamedParameters_invalid_missing() => + super.test_getHierarchyNamedParameters_invalid_missing(); + + @failingTest + @override + test_getHierarchyNamedParameters_invalid_notNamed() => + super.test_getHierarchyNamedParameters_invalid_notNamed(); +} diff --git a/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart b/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart index 4501d68865260..2f20d0024ef7b 100644 --- a/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart +++ b/pkg/analysis_server/test/src/flutter/flutter_correction_test.dart @@ -12,6 +12,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(FlutterCorrectionTest); + defineReflectiveTests(FlutterCorrectionTest_UseCFE); }); } @@ -133,3 +134,9 @@ class MyWidget extends StatelessWidget { unit: testUnit); } } + +@reflectiveTest +class FlutterCorrectionTest_UseCFE extends FlutterCorrectionTest { + @override + bool get useCFE => true; +} diff --git a/pkg/analysis_server/test/src/flutter/test_all.dart b/pkg/analysis_server/test/src/flutter/test_all.dart index 102ad807daf8e..d209fd58cf2e7 100644 --- a/pkg/analysis_server/test/src/flutter/test_all.dart +++ b/pkg/analysis_server/test/src/flutter/test_all.dart @@ -4,12 +4,14 @@ import 'package:test_reflective_loader/test_reflective_loader.dart'; -import 'flutter_outline_computer_test.dart' as outline_computer_test; -import 'flutter_outline_notification_test.dart' as outline_notification_test; +import 'flutter_correction_test.dart' as flutter_correction; +import 'flutter_outline_computer_test.dart' as outline_computer; +import 'flutter_outline_notification_test.dart' as outline_notification; main() { defineReflectiveSuite(() { - outline_computer_test.main(); - outline_notification_test.main(); + flutter_correction.main(); + outline_computer.main(); + outline_notification.main(); }); } diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart index b4a0ef0506084..0d6d0265a80fc 100644 --- a/pkg/analysis_server/test/src/utilities/flutter_test.dart +++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart @@ -12,6 +12,7 @@ import '../../abstract_single_unit.dart'; main() { defineReflectiveSuite(() { defineReflectiveTests(FlutterTest); + defineReflectiveTests(FlutterTest_UseCFE); }); } @@ -349,3 +350,9 @@ Text createEmptyText() => new Text(''); as InstanceCreationExpression; } } + +@reflectiveTest +class FlutterTest_UseCFE extends FlutterTest { + @override + bool get useCFE => true; +}