[test] Fix incorrect expectation in language/nnbd/static_errors/unchecked_use_of_nullable_test/05 noSuchMethod() throws a runtime error, so the test should not expect to complete successfully when calling noSuchMethod(). Change-Id: Ib1b7c3164771939b7c7374f08d86e1b216cab392 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304204 Reviewed-by: Bob Nystrom <rnystrom@google.com> Auto-Submit: Alexander Markov <alexmarkov@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
diff --git a/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart b/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart index e4bbab6..5c9aafa 100644 --- a/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart +++ b/tests/language/nnbd/static_errors/unchecked_use_of_nullable_test.dart
@@ -16,7 +16,7 @@ x.toString(); //# 02: ok x.hashCode; //# 03: ok x.runtimeType; //# 04: ok - x.noSuchMethod(Invocation.method(#toString, [])); //# 05: ok + x.noSuchMethod(Invocation.method(#toString, [])); //# 05: runtime error x + 1; //# 06: compile-time error -x; //# 06: compile-time error x++; //# 07: compile-time error