diff --git a/src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.Dictionary.NonStringKey.cs b/src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.Dictionary.NonStringKey.cs index 177b42fae56e6..04b3b1446b57c 100644 --- a/src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.Dictionary.NonStringKey.cs +++ b/src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.Dictionary.NonStringKey.cs @@ -578,6 +578,7 @@ public class SuffixNamingPolicy : JsonNamingPolicy } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void RoundtripAllDictionaryConverters() { const string Expected = @"{""1"":1}"; diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs index e5b1c18cf57d4..3464791348acf 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/JsonNode/JsonArrayTests.cs @@ -199,7 +199,7 @@ public static void CopyTo() [Fact] public static void ConvertJSONArrayToIListOfJsonNode() { - dynamic obj = JsonSerializer.Deserialize("[42]"); + JsonArray obj = JsonSerializer.Deserialize("[42]"); Assert.Equal(42, (int)obj[0]); IList ilist = obj; diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/JsonSerializerTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/JsonSerializerTests.cs index 37ff78fa6e3be..d62b1342303a6 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/JsonSerializerTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/JsonSerializerTests.cs @@ -65,6 +65,7 @@ public void DeserializeBoolean_EmptyString() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public void IncompleteContainers() { JsonException e = Assert.Throws(() => JsonSerializer.Deserialize>("[1,")); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CacheTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CacheTests.cs index e233a3440a4b3..38bac92fe1482 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CacheTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CacheTests.cs @@ -168,6 +168,7 @@ public static void PropertyCacheWithMinInputsLast() [Theory] [MemberData(nameof(WriteSuccessCases))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static async Task MultipleTypes(ITestClass testObj) { Type type = testObj.GetType(); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CollectionTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CollectionTests.cs index d0a10baf3624e..51e4c0d5e4a78 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CollectionTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CollectionTests.cs @@ -1,8 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Xunit; + namespace System.Text.Json.Serialization.Tests { + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public sealed partial class CollectionTestsDynamic : CollectionTests { public CollectionTestsDynamic() : base(JsonSerializerWrapperForString.StringSerializer, JsonSerializerWrapperForStream.AsyncStreamSerializer) { } diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CustomConverterTests/CustomConverterTests.Dynamic.Sample.Tests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CustomConverterTests/CustomConverterTests.Dynamic.Sample.Tests.cs index 5b208c603ff1e..1c6bca5093649 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CustomConverterTests/CustomConverterTests.Dynamic.Sample.Tests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CustomConverterTests/CustomConverterTests.Dynamic.Sample.Tests.cs @@ -22,7 +22,7 @@ private enum MyCustomEnum Hello = 77 } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void VerifyPrimitives() { var options = new JsonSerializerOptions(); @@ -67,7 +67,7 @@ public static void VerifyPrimitives() Assert.Equal(4.2, dbl); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void VerifyArray() { var options = new JsonSerializerOptions(); @@ -97,7 +97,7 @@ public static void VerifyArray() Assert.Equal(10, (int)obj.MyArray[0]); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void JsonDynamicTypes_Serialize() { var options = new JsonSerializerOptions(); @@ -149,7 +149,7 @@ public static void JsonDynamicTypes_Serialize() JsonTestHelper.AssertJsonEqual("{\"One\":1,\"Two\":2}", json); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void JsonDynamicTypes_Deserialize() { var options = new JsonSerializerOptions(); @@ -164,7 +164,7 @@ public static void JsonDynamicTypes_Deserialize() JsonSerializer.Deserialize("\"str\"", options); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void JsonDynamicTypes_Deserialize_AsObject() { var options = new JsonSerializerOptions(); @@ -181,7 +181,7 @@ public static void JsonDynamicTypes_Deserialize_AsObject() /// /// Use a mutable DOM with the 'dynamic' keyword. /// - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void VerifyMutableDom_UsingDynamicKeyword() { var options = new JsonSerializerOptions(); @@ -221,7 +221,7 @@ public static void VerifyMutableDom_UsingDynamicKeyword() /// /// Use a mutable DOM without the 'dynamic' keyword. /// - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void VerifyMutableDom_WithoutUsingDynamicKeyword() { var options = new JsonSerializerOptions(); @@ -263,7 +263,7 @@ public static void VerifyMutableDom_WithoutUsingDynamicKeyword() /// Use a mutable DOM without the 'dynamic' keyword and use round-trippable values /// meaning the 'JsonDynamicType' values are used instead of raw primitives. /// - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void VerifyMutableDom_WithoutUsingDynamicKeyword_JsonDynamicType() { var options = new JsonSerializerOptions(); @@ -306,7 +306,7 @@ void Verify() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void DynamicObject_MissingProperty() { var options = new JsonSerializerOptions(); @@ -317,7 +317,7 @@ public static void DynamicObject_MissingProperty() Assert.Equal(null, obj.NonExistingProperty); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void DynamicObject_CaseSensitivity() { var options = new JsonSerializerOptions(); @@ -338,7 +338,7 @@ public static void DynamicObject_CaseSensitivity() Assert.Equal(42, (int)obj.MYPROPERTY); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void NamingPoliciesAreNotUsed() { const string Json = "{\"myProperty\":42}"; @@ -353,7 +353,7 @@ public static void NamingPoliciesAreNotUsed() JsonTestHelper.AssertJsonEqual(Json, json); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void NullHandling() { var options = new JsonSerializerOptions(); @@ -363,7 +363,7 @@ public static void NullHandling() Assert.Null(obj); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void QuotedNumbers_Deserialize() { var options = new JsonSerializerOptions(); @@ -381,7 +381,7 @@ public static void QuotedNumbers_Deserialize() Assert.Equal(float.NaN, (float)obj); } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void QuotedNumbers_Serialize() { var options = new JsonSerializerOptions(); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/DynamicTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/DynamicTests.cs index 8ac2ea1656bc3..7c3b9315ecd12 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/DynamicTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/DynamicTests.cs @@ -37,7 +37,7 @@ internal static ExpandoObject GetExpandoObject() return myDynamic; } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void DynamicKeyword() { dynamic myDynamic = GetExpandoObject(); @@ -100,7 +100,7 @@ void VerifyArray() } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] public static void ExpandoObject() { ExpandoObject expando = JsonSerializer.Deserialize(Json); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NullableTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NullableTests.cs index 42ec4baa1e7bf..6f09ae4d9911d 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NullableTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NullableTests.cs @@ -11,6 +11,7 @@ namespace System.Text.Json.Serialization.Tests public static partial class NullableTests { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void DictionaryWithNullableValue() { Dictionary dictWithFloatValue = new Dictionary { { "key", 42.0f } }; @@ -170,6 +171,7 @@ public class SimpleClassWithDictionariesWithNullableValues } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void ClassWithDictionariesWithNullableValues() { string json = diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NumberHandlingTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NumberHandlingTests.cs index c2ec42535b3f6..7b0e89439d00a 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NumberHandlingTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/NumberHandlingTests.cs @@ -360,6 +360,7 @@ public class Class_With_ListsOfBoxedNonNumbers [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/49936", TestPlatforms.Android)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void Number_AsCollectionElement_RoundTrip() { RunAsCollectionElementTest(JsonNumberTestData.Bytes); @@ -603,6 +604,7 @@ private static void AssertDictionaryElements_StringValues(string serialized) [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/39674", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoInterpreter))] [SkipOnCoreClr("https://github.com/dotnet/runtime/issues/45464", RuntimeConfiguration.Checked)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void DictionariesRoundTrip() { RunAllDictionariessRoundTripTest(JsonNumberTestData.ULongs); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.ReadTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.ReadTests.cs index 6a36e96d3818b..dad7330b97a72 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.ReadTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.ReadTests.cs @@ -368,6 +368,7 @@ private ConcreteDerivedClassWithNoPublicDefaultCtor(string error) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void ReadClassWithStringToPrimitiveDictionary() { TestClassWithStringToPrimitiveDictionary obj = JsonSerializer.Deserialize(TestClassWithStringToPrimitiveDictionary.s_data); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.WriteTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.WriteTests.cs index d4e551d6d01b2..6842ab78ae483 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.WriteTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Object.WriteTests.cs @@ -17,6 +17,7 @@ public static void VerifyTypeFail() [Theory] [MemberData(nameof(WriteSuccessCases))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void Write(ITestClass testObj) { var options = new JsonSerializerOptions { IncludeFields = true }; diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReadValueTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReadValueTests.cs index c29c401039161..b256f944f36aa 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReadValueTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReadValueTests.cs @@ -508,6 +508,7 @@ public static void ReadSimpleStruct() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void ReadClasses() { { diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReferenceHandlerTests.Deserialize.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReferenceHandlerTests.Deserialize.cs index 18221ff762f4d..568956a952478 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReferenceHandlerTests.Deserialize.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/ReferenceHandlerTests.Deserialize.cs @@ -1240,6 +1240,7 @@ public static void ReferenceObjectBeforePreservedObject() [Theory] [MemberData(nameof(ReadSuccessCases))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void ReadTestClassesWithExtensionOption(Type classType, byte[] data) { var options = new JsonSerializerOptions { IncludeFields = true, ReferenceHandler = ReferenceHandler.Preserve }; diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/SpanTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/SpanTests.cs index c01ce57372c1f..acd80b190c993 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/SpanTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/SpanTests.cs @@ -17,6 +17,7 @@ public static void ParseNullTypeFail() [Theory] [MemberData(nameof(ReadSuccessCases))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void Read(Type classType, byte[] data) { var options = new JsonSerializerOptions { IncludeFields = true }; @@ -27,6 +28,7 @@ public static void Read(Type classType, byte[] data) [Theory] [MemberData(nameof(ReadSuccessCases))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public static void ReadFromStream(Type classType, byte[] data) { MemoryStream stream = new MemoryStream(data); diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Stream.Collections.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Stream.Collections.cs index b5fa2534860bd..f8875dc7d116e 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Stream.Collections.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/Stream.Collections.cs @@ -18,6 +18,7 @@ public partial class StreamTests [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/35927", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoInterpreter))] [ActiveIssue("https://github.com/dotnet/runtime/issues/35927", TestPlatforms.Browser)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/58204", TestPlatforms.iOS | TestPlatforms.tvOS)] public async Task HandleCollectionsAsync() { await RunTestAsync();