| Index: pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| 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 8001fc0f8663b544520c404c13899e8dec4cd142..67e46cc94632280ac070e36e919593c7610bd0de 100644
|
| --- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| +++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
|
| @@ -9,9 +9,9 @@ import 'dart:async';
|
| import 'package:analysis_server/src/protocol.dart';
|
| import 'package:analysis_server/src/services/refactoring/extract_method.dart';
|
| import 'package:analysis_server/src/services/refactoring/refactoring.dart';
|
| -import '../../reflective_tests.dart';
|
| import 'package:unittest/unittest.dart';
|
|
|
| +import '../../reflective_tests.dart';
|
| import 'abstract_refactoring.dart';
|
|
|
|
|
| @@ -1323,6 +1323,25 @@ class A {
|
| ''');
|
| }
|
|
|
| + test_singleExpression_parameter_functionTypeAlias() {
|
| + indexTestUnit('''
|
| +typedef R Foo<S, R>(S s);
|
| +void main(Foo<String, int> foo, String s) {
|
| + int a = foo(s);
|
| +}
|
| +''');
|
| + _createRefactoringForString('foo(s)');
|
| + // apply refactoring
|
| + return _assertSuccessfulRefactoring('''
|
| +typedef R Foo<S, R>(S s);
|
| +void main(Foo<String, int> foo, String s) {
|
| + int a = res(foo, s);
|
| +}
|
| +
|
| +int res(Foo<String, int> foo, String s) => foo(s);
|
| +''');
|
| + }
|
| +
|
| test_singleExpression_returnTypeGeneric() {
|
| indexTestUnit('''
|
| main() {
|
|
|