| Index: pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
|
| diff --git a/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart b/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
|
| index 7b9b933973941f16ec1a328330c89e10378b925a..ac056c2a5433a20a7011ff2bba3aca361027e3f7 100644
|
| --- a/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
|
| +++ b/pkg/analyzer/test/src/task/strong/non_null_checker_test.dart
|
| @@ -45,13 +45,22 @@ main() {
|
|
|
| void test_nullableTypes() {
|
| // By default x can be set to null.
|
| - checkFile('''int x = null;''');
|
| + checkFile('int x = null;');
|
| }
|
|
|
| - @failingTest
|
| void test_nonnullableTypes() {
|
| // If `int`s are non-nullable, then this code should throw an error.
|
| - addFile('''int x = /*error:INVALID_ASSIGNMENT*/null;''');
|
| + addFile('int x;');
|
| + addFile('int x = /*error:INVALID_ASSIGNMENT*/null;');
|
| + addFile('int x = 0;');
|
| + addFile('''
|
| +int x = 0;
|
| +
|
| +main() {
|
| + x = 1;
|
| + x = /*error:INVALID_ASSIGNMENT*/null;
|
| +}
|
| +''');
|
| check(nonnullableTypes: <String>['dart:core,int']);
|
| }
|
| }
|
|
|