| 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 9e33386efc5f7405bc9a2f13ba4bc4b408374f2a..efb85c3225e77554f062065f1ad16dc581fcacb7 100644
|
| --- a/pkg/analysis_server/test/services/correction/fix_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| @@ -2182,6 +2182,40 @@ main() {
|
| ''');
|
| }
|
|
|
| + void test_undefinedFunction_create_dynamicArgument() {
|
| + _indexTestUnit('''
|
| +main() {
|
| + dynamic v;
|
| + test(v);
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.CREATE_FUNCTION, '''
|
| +main() {
|
| + dynamic v;
|
| + test(v);
|
| +}
|
| +
|
| +void test(v) {
|
| +}
|
| +''');
|
| + }
|
| +
|
| + void test_undefinedFunction_create_dynamicReturnType() {
|
| + _indexTestUnit('''
|
| +main() {
|
| + dynamic v = test();
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.CREATE_FUNCTION, '''
|
| +main() {
|
| + dynamic v = test();
|
| +}
|
| +
|
| +test() {
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_undefinedFunction_create_fromFunction() {
|
| _indexTestUnit('''
|
| main() {
|
| @@ -2262,6 +2296,22 @@ void process(List<int> items) {
|
| ''');
|
| }
|
|
|
| + void test_undefinedFunction_create_nullArgument() {
|
| + _indexTestUnit('''
|
| +main() {
|
| + test(null);
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.CREATE_FUNCTION, '''
|
| +main() {
|
| + test(null);
|
| +}
|
| +
|
| +void test(arg0) {
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_undefinedFunction_create_returnType_bool_expressions() {
|
| assert_undefinedFunction_create_returnType_bool("!test();");
|
| assert_undefinedFunction_create_returnType_bool("b && test();");
|
|
|