Add test requested in earlier CL Change-Id: I112004e06150ed913d64b77f272a4ae85c6ef61a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156926 Auto-Submit: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart index 6589af2..67c35f1 100644 --- a/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart +++ b/pkg/analysis_server/test/src/services/correction/fix/add_null_check_test.dart
@@ -61,7 +61,8 @@ '''); } - Future<void> test_assignment_differByMoreThanNullability() async { + Future<void> + test_assignment_differByMoreThanNullability_nonNullableRight() async { await resolveTestUnit(''' void f(int x, String y) { x = y; @@ -70,6 +71,16 @@ await assertNoFix(); } + Future<void> + test_assignment_differByMoreThanNullability_nullableRight() async { + await resolveTestUnit(''' +void f(int x, String? y) { + x = y; +} +'''); + await assertNoFix(); + } + Future<void> test_assignment_needsParens() async { await resolveTestUnit(''' void f(A x) {