@@ -26,6 +26,7 @@ namespace System.Text.Json.SourceGeneration.Tests
2626 [ JsonSerializable ( typeof ( RealWorldContextTests . MyNestedClass . MyNestedNestedClass ) ) ]
2727 [ JsonSerializable ( typeof ( object [ ] ) ) ]
2828 [ JsonSerializable ( typeof ( string ) ) ]
29+ [ JsonSerializable ( typeof ( ( string Label1 , int Label2 , bool ) ) ) ]
2930 [ JsonSerializable ( typeof ( RealWorldContextTests . ClassWithEnumAndNullable ) ) ]
3031 [ JsonSerializable ( typeof ( ClassWithCustomConverter ) ) ]
3132 [ JsonSerializable ( typeof ( StructWithCustomConverter ) ) ]
@@ -61,6 +62,7 @@ internal partial class SerializationContext : JsonSerializerContext, ITestContex
6162 [ JsonSerializable ( typeof ( RealWorldContextTests . MyNestedClass . MyNestedNestedClass ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
6263 [ JsonSerializable ( typeof ( object [ ] ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
6364 [ JsonSerializable ( typeof ( string ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
65+ [ JsonSerializable ( typeof ( ( string Label1 , int Label2 , bool ) ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
6466 [ JsonSerializable ( typeof ( RealWorldContextTests . ClassWithEnumAndNullable ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
6567 [ JsonSerializable ( typeof ( ClassWithCustomConverter ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
6668 [ JsonSerializable ( typeof ( StructWithCustomConverter ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
@@ -77,7 +79,7 @@ internal partial class SerializationWithPerTypeAttributeContext : JsonSerializer
7779 public JsonSourceGenerationMode JsonSourceGenerationMode => JsonSourceGenerationMode . Serialization ;
7880 }
7981
80- [ JsonSourceGenerationOptions ( PropertyNamingPolicy = JsonKnownNamingPolicy . CamelCase ) ]
82+ [ JsonSourceGenerationOptions ( PropertyNamingPolicy = JsonKnownNamingPolicy . CamelCase , IncludeFields = true ) ]
8183 [ JsonSerializable ( typeof ( Location ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
8284 [ JsonSerializable ( typeof ( RepeatedTypes . Location ) , GenerationMode = JsonSourceGenerationMode . Serialization , TypeInfoPropertyName = "RepeatedLocation" ) ]
8385 [ JsonSerializable ( typeof ( NumberTypes ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
@@ -97,6 +99,7 @@ internal partial class SerializationWithPerTypeAttributeContext : JsonSerializer
9799 [ JsonSerializable ( typeof ( RealWorldContextTests . MyNestedClass . MyNestedNestedClass ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
98100 [ JsonSerializable ( typeof ( object [ ] ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
99101 [ JsonSerializable ( typeof ( string ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
102+ [ JsonSerializable ( typeof ( ( string Label1 , int Label2 , bool ) ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
100103 [ JsonSerializable ( typeof ( RealWorldContextTests . ClassWithEnumAndNullable ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
101104 [ JsonSerializable ( typeof ( ClassWithCustomConverter ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
102105 [ JsonSerializable ( typeof ( StructWithCustomConverter ) , GenerationMode = JsonSourceGenerationMode . Serialization ) ]
@@ -144,6 +147,7 @@ public override void EnsureFastPathGeneratedAsExpected()
144147 Assert . NotNull ( SerializationContext . Default . MyNestedNestedClass . Serialize ) ;
145148 Assert . Null ( SerializationContext . Default . ObjectArray . Serialize ) ;
146149 Assert . Null ( SerializationContext . Default . String . Serialize ) ;
150+ Assert . NotNull ( SerializationContext . Default . ValueTupleStringInt32Boolean . Serialize ) ;
147151 Assert . NotNull ( SerializationContext . Default . ClassWithEnumAndNullable . Serialize ) ;
148152 Assert . Null ( SerializationContext . Default . ClassWithCustomConverter . Serialize ) ;
149153 Assert . Null ( SerializationContext . Default . StructWithCustomConverter . Serialize ) ;
@@ -411,6 +415,7 @@ public override void EnsureFastPathGeneratedAsExpected()
411415 Assert . Null ( SerializationWithPerTypeAttributeContext . Default . ObjectArray . Serialize ) ;
412416 Assert . Null ( SerializationWithPerTypeAttributeContext . Default . SampleEnum . Serialize ) ;
413417 Assert . Null ( SerializationWithPerTypeAttributeContext . Default . String . Serialize ) ;
418+ Assert . NotNull ( SerializationWithPerTypeAttributeContext . Default . ValueTupleStringInt32Boolean . Serialize ) ;
414419 Assert . NotNull ( SerializationWithPerTypeAttributeContext . Default . ClassWithEnumAndNullable . Serialize ) ;
415420 Assert . Null ( SerializationWithPerTypeAttributeContext . Default . ClassWithCustomConverter . Serialize ) ;
416421 Assert . Null ( SerializationWithPerTypeAttributeContext . Default . StructWithCustomConverter . Serialize ) ;
0 commit comments