@@ -121,7 +121,7 @@ public static IEnumerable<object[]> ArrayPropertyTestData()
121
121
}
122
122
123
123
[ Theory ]
124
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
124
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
125
125
[ MemberData ( nameof ( ArrayPropertyTestData ) ) ]
126
126
public void ArrayPropertyTest ( string propertyName , NullabilityState elementState , NullabilityState propertyState )
127
127
{
@@ -143,7 +143,7 @@ public static IEnumerable<object[]> GenericArrayPropertyTestData()
143
143
}
144
144
145
145
[ Theory ]
146
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
146
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
147
147
[ MemberData ( nameof ( GenericArrayPropertyTestData ) ) ]
148
148
public void GenericArrayPropertyTest ( string propertyName , NullabilityState elementState , NullabilityState propertyState )
149
149
{
@@ -167,7 +167,7 @@ public static IEnumerable<object[]> JaggedArrayPropertyTestData()
167
167
}
168
168
169
169
[ Theory ]
170
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
170
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
171
171
[ MemberData ( nameof ( JaggedArrayPropertyTestData ) ) ]
172
172
public void JaggedArrayPropertyTest ( string propertyName , NullabilityState innermodtElementState , NullabilityState elementState , NullabilityState propertyState )
173
173
{
@@ -192,7 +192,7 @@ public static IEnumerable<object[]> TuplePropertyTestData()
192
192
}
193
193
194
194
[ Theory ]
195
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
195
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
196
196
[ MemberData ( nameof ( TuplePropertyTestData ) ) ]
197
197
public void TuplePropertyTest ( string propertyName , NullabilityState genericParam1 , NullabilityState genericParam2 , NullabilityState genericParam3 , NullabilityState propertyState )
198
198
{
@@ -217,7 +217,7 @@ public static IEnumerable<object[]> GenericTuplePropertyTestData()
217
217
}
218
218
219
219
[ Theory ]
220
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
220
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
221
221
[ MemberData ( nameof ( GenericTuplePropertyTestData ) ) ]
222
222
public void GenericTuplePropertyTest ( string propertyName , NullabilityState genericParam1 , NullabilityState genericParam2 , NullabilityState genericParam3 , NullabilityState propertyState )
223
223
{
@@ -243,7 +243,7 @@ public static IEnumerable<object[]> DictionaryPropertyTestData()
243
243
}
244
244
245
245
[ Theory ]
246
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
246
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
247
247
[ MemberData ( nameof ( DictionaryPropertyTestData ) ) ]
248
248
public void DictionaryPropertyTest ( string propertyName , NullabilityState keyState , NullabilityState valueElement , NullabilityState valueState , NullabilityState propertyState )
249
249
{
@@ -269,7 +269,7 @@ public static IEnumerable<object[]> GenericDictionaryPropertyTestData()
269
269
}
270
270
271
271
[ Theory ]
272
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
272
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
273
273
[ MemberData ( nameof ( GenericDictionaryPropertyTestData ) ) ]
274
274
public void GenericDictionaryPropertyTest ( string propertyName , NullabilityState keyState , NullabilityState valueElement , NullabilityState valueState , NullabilityState propertyState )
275
275
{
@@ -435,7 +435,7 @@ public void GenericFieldNullableValueTypeTest(string fieldName, NullabilityState
435
435
436
436
public static IEnumerable < object [ ] > GenericNotnullConstraintFieldsTestData ( )
437
437
{
438
- yield return new object [ ] { "FieldNullable" , NullabilityState . NotNull , NullabilityState . NotNull , typeof ( string ) } ;
438
+ yield return new object [ ] { "FieldNullable" , NullabilityState . Nullable , NullabilityState . Nullable , typeof ( string ) } ;
439
439
yield return new object [ ] { "FieldUnknown" , NullabilityState . Unknown , NullabilityState . Unknown , typeof ( string ) } ;
440
440
yield return new object [ ] { "FieldNullableEnabled" , NullabilityState . NotNull , NullabilityState . NotNull , typeof ( string ) } ;
441
441
}
@@ -453,7 +453,7 @@ public void GenericNotNullConstraintFieldsTest(string fieldName, NullabilityStat
453
453
454
454
public static IEnumerable < object [ ] > GenericNotnullConstraintPropertiesTestData ( )
455
455
{
456
- yield return new object [ ] { "PropertyNullable" , NullabilityState . NotNull , NullabilityState . NotNull , typeof ( string ) } ;
456
+ yield return new object [ ] { "PropertyNullable" , NullabilityState . Nullable , NullabilityState . Nullable , typeof ( string ) } ;
457
457
yield return new object [ ] { "PropertyUnknown" , NullabilityState . Unknown , NullabilityState . Unknown , typeof ( string ) } ;
458
458
yield return new object [ ] { "PropertyNullableEnabled" , NullabilityState . NotNull , NullabilityState . NotNull , typeof ( string ) } ;
459
459
}
@@ -462,8 +462,8 @@ public static IEnumerable<object[]> GenericNotnullConstraintPropertiesTestData()
462
462
[ MemberData ( nameof ( GenericNotnullConstraintPropertiesTestData ) ) ]
463
463
public void GenericNotNullConstraintPropertiesTest ( string propertyName , NullabilityState readState , NullabilityState writeState , Type type )
464
464
{
465
- PropertyInfo field = typeof ( GenericTestConstrainedNotNull < string > ) . GetProperty ( propertyName , flags ) ! ;
466
- NullabilityInfo nullability = nullabilityContext . Create ( field ) ;
465
+ PropertyInfo property = typeof ( GenericTestConstrainedNotNull < string > ) . GetProperty ( propertyName , flags ) ! ;
466
+ NullabilityInfo nullability = nullabilityContext . Create ( property ) ;
467
467
Assert . Equal ( readState , nullability . ReadState ) ;
468
468
Assert . Equal ( writeState , nullability . WriteState ) ;
469
469
Assert . Equal ( type , nullability . Type ) ;
@@ -498,8 +498,8 @@ public static IEnumerable<object[]> GenericStructConstraintPropertiesTestData()
498
498
[ MemberData ( nameof ( GenericStructConstraintPropertiesTestData ) ) ]
499
499
public void GenericStructConstraintPropertiesTest ( string propertyName , NullabilityState readState , NullabilityState writeState , Type type )
500
500
{
501
- PropertyInfo field = typeof ( GenericTestConstrainedStruct < int > ) . GetProperty ( propertyName , flags ) ! ;
502
- NullabilityInfo nullability = nullabilityContext . Create ( field ) ;
501
+ PropertyInfo property = typeof ( GenericTestConstrainedStruct < int > ) . GetProperty ( propertyName , flags ) ! ;
502
+ NullabilityInfo nullability = nullabilityContext . Create ( property ) ;
503
503
Assert . Equal ( readState , nullability . ReadState ) ;
504
504
Assert . Equal ( writeState , nullability . WriteState ) ;
505
505
Assert . Equal ( type , nullability . Type ) ;
@@ -580,7 +580,7 @@ public static IEnumerable<object[]> MethodReturnParameterTestData()
580
580
}
581
581
582
582
[ Theory ]
583
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
583
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
584
584
[ MemberData ( nameof ( MethodReturnParameterTestData ) ) ]
585
585
public void MethodReturnParameterTest ( string methodName , NullabilityState elementState , NullabilityState readState )
586
586
{
@@ -606,7 +606,7 @@ public static IEnumerable<object[]> MethodReturnsTupleTestData()
606
606
}
607
607
608
608
[ Theory ]
609
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
609
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
610
610
[ MemberData ( nameof ( MethodReturnsTupleTestData ) ) ]
611
611
public void MethodReturnsTupleTest ( string methodName , NullabilityState param1 , NullabilityState param2 , NullabilityState readState )
612
612
{
@@ -630,7 +630,7 @@ public static IEnumerable<object[]> MethodGenericReturnParameterTestData()
630
630
}
631
631
632
632
[ Theory ]
633
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
633
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
634
634
[ MemberData ( nameof ( MethodGenericReturnParameterTestData ) ) ]
635
635
public void MethodGenericReturnParameterTest ( string methodName , NullabilityState readState , NullabilityState elementState )
636
636
{
@@ -653,7 +653,7 @@ public static IEnumerable<object[]> MethodParametersTestData()
653
653
}
654
654
655
655
[ Theory ]
656
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
656
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
657
657
[ MemberData ( nameof ( MethodParametersTestData ) ) ]
658
658
public void MethodParametersTest ( string methodName , NullabilityState stringState , NullabilityState dictKey , NullabilityState dictValueElement , NullabilityState dictValue , NullabilityState dictionaryState )
659
659
{
@@ -677,7 +677,7 @@ public static IEnumerable<object[]> MethodGenericParametersTestData()
677
677
}
678
678
679
679
[ Theory ]
680
- [ SkipOnMono ( "Disabling NullablePublicOnly feature not work for Mono tests " ) ]
680
+ [ SkipOnMono ( "Nullability attributes trimmed on Mono" ) ]
681
681
[ MemberData ( nameof ( MethodGenericParametersTestData ) ) ]
682
682
public void MethodGenericParametersTest ( string methodName , NullabilityState param1State , NullabilityState dictKey , NullabilityState dictValue , NullabilityState dictionaryState )
683
683
{
@@ -855,18 +855,23 @@ public static IEnumerable<object[]> NestedGenericsReturnParameterData()
855
855
// public IEnumerable<Tuple<(string name, object? value), int>?> MethodReturnsEnumerableNonTupleNonNonNullValueTupleNonNullNon() => null!;
856
856
yield return new object [ ] { "MethodReturnsEnumerableNonTupleNonNonNullValueTupleNonNullNon" ,
857
857
NullabilityState . NotNull , NullabilityState . NotNull , NullabilityState . NotNull , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable } ;
858
+
858
859
// public IEnumerable<Tuple<(string? name, object value)?, int>?>? MethodReturnsEnumerableNullTupleNullNonNullValueTupleNullNonNull() => null!;
859
860
yield return new object [ ] { "MethodReturnsEnumerableNullTupleNullNonNullValueTupleNullNonNull" ,
860
861
NullabilityState . Nullable , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable , NullabilityState . Nullable , NullabilityState . NotNull } ;
862
+
861
863
// public IEnumerable<Tuple<Tuple<string, object?>, int>?> MethodReturnsEnumerableNonTupleNonNonNullTupleNonNullNon() => null!;
862
864
yield return new object [ ] { "MethodReturnsEnumerableNonTupleNonNonNullTupleNonNullNon" ,
863
865
NullabilityState . NotNull , NullabilityState . NotNull , NullabilityState . NotNull , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable } ;
866
+
864
867
// public IEnumerable<GenericStruct<Tuple<string, object?>?, int>?>? MethodReturnsEnumerableNullStructNullNonNonTupleNonNullNull() => null;
865
868
yield return new object [ ] { "MethodReturnsEnumerableNullStructNullNonNullTupleNonNullNull" ,
866
869
NullabilityState . Nullable , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable } ;
870
+
867
871
// public IEnumerable<Tuple<GenericStruct<string, object?>?, int>?>? MethodReturnsEnumerableNullTupleNullNonNullStructNonNullNull() => null;
868
872
yield return new object [ ] { "MethodReturnsEnumerableNullTupleNullNonNullStructNonNullNull" ,
869
873
NullabilityState . Nullable , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . Nullable } ;
874
+
870
875
// public IEnumerable<(GenericStruct<string, object?> str, int? count)> MethodReturnsEnumerableNonValueTupleNonNullNonTupleNonNullNon() => null!;
871
876
yield return new object [ ] { "MethodReturnsEnumerableNonValueTupleNonNullNonStructNonNullNon" ,
872
877
NullabilityState . NotNull , NullabilityState . NotNull , NullabilityState . Nullable , NullabilityState . NotNull , NullabilityState . NotNull , NullabilityState . Nullable } ;
0 commit comments