| 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 073a0c62c33a5df0358573e26af80d6686b402b6..cac20900ccd74a5b2f61d558768b126b0f100937 100644
|
| --- a/pkg/analysis_server/test/services/correction/assist_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| @@ -2220,35 +2220,6 @@ main() {
|
| ''');
|
| }
|
|
|
| - void test_splitAndCondition_OK_thenBlock_elseBlock() {
|
| - _indexTestUnit('''
|
| -main() {
|
| - if (true && false) {
|
| - print(0);
|
| - } else {
|
| - print(1);
|
| - if (2 == 2) {
|
| - print(2);
|
| - }
|
| - }
|
| -}
|
| -''');
|
| - assertHasAssistAt('&& false', AssistKind.SPLIT_AND_CONDITION, '''
|
| -main() {
|
| - if (true) {
|
| - if (false) {
|
| - print(0);
|
| - } else {
|
| - print(1);
|
| - if (2 == 2) {
|
| - print(2);
|
| - }
|
| - }
|
| - }
|
| -}
|
| -''');
|
| - }
|
| -
|
| void test_splitAndCondition_OK_thenStatement() {
|
| _indexTestUnit('''
|
| main() {
|
| @@ -2265,26 +2236,6 @@ main() {
|
| ''');
|
| }
|
|
|
| - void test_splitAndCondition_OK_thenStatement_elseStatement() {
|
| - _indexTestUnit('''
|
| -main() {
|
| - if (true && false)
|
| - print(0);
|
| - else
|
| - print(1);
|
| -}
|
| -''');
|
| - assertHasAssistAt('&& false', AssistKind.SPLIT_AND_CONDITION, '''
|
| -main() {
|
| - if (true)
|
| - if (false)
|
| - print(0);
|
| - else
|
| - print(1);
|
| -}
|
| -''');
|
| - }
|
| -
|
| void test_splitAndCondition_wrong() {
|
| _indexTestUnit('''
|
| main() {
|
| @@ -2314,6 +2265,19 @@ main() {
|
| assertNoAssistAt('|| 2', AssistKind.SPLIT_AND_CONDITION);
|
| }
|
|
|
| + void test_splitAndCondition_wrong_hasElse() {
|
| + _indexTestUnit('''
|
| +main() {
|
| + if (1 == 1 && 2 == 2) {
|
| + print(1);
|
| + } else {
|
| + print(2);
|
| + }
|
| +}
|
| +''');
|
| + assertNoAssistAt('&& 2', AssistKind.SPLIT_AND_CONDITION);
|
| + }
|
| +
|
| void test_splitAndCondition_wrong_notPartOfIf() {
|
| _indexTestUnit('''
|
| main() {
|
|
|