The following unit test:
| [Theory] |
| [InlineData(typeof(Dictionary<string,object>),typeof(DictionaryOverflowConverter),typeof(object))] |
| [InlineData(typeof(Dictionary<string,JsonElement>),typeof(JsonElementOverflowConverter),typeof(JsonElement))] |
| [InlineData(typeof(CustomOverflowDictionary<object>),typeof(CustomObjectDictionaryOverflowConverter),typeof(object))] |
| [InlineData(typeof(CustomOverflowDictionary<JsonElement>),typeof(CustomJsonElementDictionaryOverflowConverter),typeof(JsonElement))] |
| publicvoidExtensionProperty_IgnoresCustomSerializerWithOptions(TypeoverflowType,TypeconverterType,TypeelementType) |
| { |
| typeof(ExtensionDataTests) |
| .GetMethod(nameof(ExtensionProperty_IgnoresCustomSerializerWithOptionsInternal),BindingFlags.Static|BindingFlags.NonPublic) |
| .MakeGenericMethod(overflowType,elementType,converterType) |
| .Invoke(null,null); |
| } |
hardcodes testing to the reflection serializer. Switching the test to use source gen causes it to fail.
Discovered while investigating #86975.
The following unit test:
runtime/src/libraries/System.Text.Json/tests/Common/ExtensionDataTests.cs
Lines 518 to 529 in 534d1df
hardcodes testing to the reflection serializer. Switching the test to use source gen causes it to fail.
Discovered while investigating #86975.