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 1d965e516a34c688c614649584d401f65f32caf4..8a9fc8aed1c67bb67954aafb04c0bec28771d532 100644 |
--- a/pkg/analysis_server/test/services/correction/assist_test.dart |
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart |
@@ -2684,6 +2684,34 @@ main() { |
await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER); |
} |
+ test_joinIfStatementInner_wrong_statementAfterInner() async { |
+ resolveTestUnit(''' |
+main() { |
+ if (1 == 1) { |
+ if (2 == 2) { |
+ print(2); |
+ } |
+ print(1); |
+ } |
+} |
+'''); |
+ await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER); |
+ } |
+ |
+ test_joinIfStatementInner_wrong_statementBeforeInner() async { |
+ resolveTestUnit(''' |
+main() { |
+ if (1 == 1) { |
+ print(1); |
+ if (2 == 2) { |
+ print(2); |
+ } |
+ } |
+} |
+'''); |
+ await assertNoAssistAt('if (1 ==', DartAssistKind.JOIN_IF_WITH_INNER); |
+ } |
+ |
test_joinIfStatementInner_wrong_targetNotIf() async { |
resolveTestUnit(''' |
main() { |
@@ -2914,6 +2942,34 @@ main() { |
await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER); |
} |
+ test_joinIfStatementOuter_wrong_statementAfterInner() async { |
+ resolveTestUnit(''' |
+main() { |
+ if (1 == 1) { |
+ if (2 == 2) { |
+ print(2); |
+ } |
+ print(1); |
+ } |
+} |
+'''); |
+ await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER); |
+ } |
+ |
+ test_joinIfStatementOuter_wrong_statementBeforeInner() async { |
+ resolveTestUnit(''' |
+main() { |
+ if (1 == 1) { |
+ print(1); |
+ if (2 == 2) { |
+ print(2); |
+ } |
+ } |
+} |
+'''); |
+ await assertNoAssistAt('if (2 == 2', DartAssistKind.JOIN_IF_WITH_OUTER); |
+ } |
+ |
test_joinIfStatementOuter_wrong_targetNotIf() async { |
resolveTestUnit(''' |
main() { |