| Index: pkg/analysis_server/test/services/correction/assist_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| index fd118e9ec6c003eaf966c04ac02bd38905722819..65c8cd1076c647788f6083df7982ef2be5e1bc77 100644
|
| --- a/pkg/analysis_server/test/services/correction/assist_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| @@ -203,19 +203,6 @@ main(List<String> items) {
|
| ''');
|
| }
|
|
|
| - void test_addTypeAnnotation_local_OK_onVariableDeclarationStatement() {
|
| - _indexTestUnit('''
|
| -main() {
|
| - var v = 123; // marker
|
| -}
|
| -''');
|
| - assertHasAssistAt(' // marker', AssistKind.ADD_TYPE_ANNOTATION, '''
|
| -main() {
|
| - int v = 123; // marker
|
| -}
|
| -''');
|
| - }
|
| -
|
| void test_addTypeAnnotation_local_OK_Function() {
|
| _indexTestUnit('''
|
| main() {
|
| @@ -294,6 +281,19 @@ main() {
|
| ''');
|
| }
|
|
|
| + void test_addTypeAnnotation_local_OK_onVariableDeclarationStatement() {
|
| + _indexTestUnit('''
|
| +main() {
|
| + var v = 123; // marker
|
| +}
|
| +''');
|
| + assertHasAssistAt(' // marker', AssistKind.ADD_TYPE_ANNOTATION, '''
|
| +main() {
|
| + int v = 123; // marker
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_addTypeAnnotation_local_wrong_hasTypeAnnotation() {
|
| _indexTestUnit('''
|
| main() {
|
| @@ -1980,6 +1980,19 @@ main() {
|
| ''');
|
| }
|
|
|
| + void test_replaceIfElseWithConditional_wrong_expressionVsReturn() {
|
| + _indexTestUnit('''
|
| +main() {
|
| + if (true) {
|
| + print(42);
|
| + } else {
|
| + return;
|
| + }
|
| +}
|
| +''');
|
| + assertNoAssistAt('else', AssistKind.REPLACE_IF_ELSE_WITH_CONDITIONAL);
|
| + }
|
| +
|
| void test_replaceIfElseWithConditional_wrong_notIfStatement() {
|
| _indexTestUnit('''
|
| main() {
|
|
|