From 82f7144f791314885c0e4e86f16e579357bfe7e3 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Tue, 17 Aug 2021 16:28:09 -0500 Subject: [PATCH] [wasm] Enable tests blocked by IL2105 (#57457) * Disable ReflectionCachesUpdateHandler_CachesCleared with aggressive trimming * Enable more tests stopped by 2105 * Create tests.mobile.targets Suppress IL2025 * Remove comment enabling trim warnings * Mark more active issues --- eng/testing/tests.mobile.targets | 3 +-- .../tests/ReflectionCachesUpdateHandlerTests.cs | 1 + .../ObservableCollection_ConstructorAndPropertyTests.cs | 2 ++ .../ObservableCollection_Serialization.cs | 1 + .../tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs | 3 +++ .../ReadOnlyObservableCollectionTests.cs | 2 ++ src/libraries/tests.proj | 5 ----- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 0cb9a22a4b6cd..fc196e0053efb 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -13,8 +13,7 @@ true true - - $(NoWarn);IL2111 + $(NoWarn);IL2111;IL2105;IL2025 false diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs index 905a580b72a96..84a7069bed6e3 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs @@ -11,6 +11,7 @@ namespace System.ComponentModel.Tests public class ReflectionCachesUpdateHandlerTests { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57456", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public void ReflectionCachesUpdateHandler_CachesCleared() { AttributeCollection ac1 = TypeDescriptor.GetAttributes(typeof(ReflectionCachesUpdateHandlerTests)); diff --git a/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs b/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs index cd8a7be947b74..c8a1e0acd756e 100644 --- a/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs +++ b/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_ConstructorAndPropertyTests.cs @@ -118,6 +118,7 @@ public static void IsReadOnlyTest() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttributeTests() { ObservableCollection col = new ObservableCollection(new[] {1, 2, 3, 4}); @@ -129,6 +130,7 @@ public static void DebuggerAttributeTests() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttribute_NullCollection_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ObservableCollection), null)); diff --git a/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs b/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs index 65d5694a93a8f..ad46a712462f3 100644 --- a/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs +++ b/src/libraries/System.ObjectModel/tests/ObservableCollection/ObservableCollection_Serialization.cs @@ -27,6 +27,7 @@ public void SerializeDeserialize_Roundtrips(ObservableCollection c) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public void OnDeserialized_MonitorNotInitialized_ExpectSuccess() { var observableCollection = new ObservableCollection(); diff --git a/src/libraries/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs b/src/libraries/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs index 0b7e426898acd..dc30790225434 100644 --- a/src/libraries/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs +++ b/src/libraries/System.ObjectModel/tests/ReadOnlyDictionary/ReadOnlyDictionaryTests.cs @@ -224,6 +224,7 @@ public static void CannotModifyDictionaryTests_Negative() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttributeTests() { ReadOnlyDictionary dict = new ReadOnlyDictionary(new Dictionary{{1, 2}, {2, 4}, {3, 6}}); @@ -247,6 +248,7 @@ public static void DebuggerAttributeTests() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttribute_NullDictionary_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary), null)); @@ -255,6 +257,7 @@ public static void DebuggerAttribute_NullDictionary_ThrowsArgumentNullException( } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttribute_NullDictionaryKeys_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary.KeyCollection), new Type[] { typeof(int) }, null)); diff --git a/src/libraries/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs b/src/libraries/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs index 6cc4f2cfe008f..981caa7eea9b1 100644 --- a/src/libraries/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs +++ b/src/libraries/System.ObjectModel/tests/ReadOnlyObservableCollection/ReadOnlyObservableCollectionTests.cs @@ -197,6 +197,7 @@ public static void CannotModifyDictionaryTests_Negative() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttribute_Tests() { ReadOnlyObservableCollection col = new ReadOnlyObservableCollection(new ObservableCollection(new[] {1, 2, 3, 4})); @@ -208,6 +209,7 @@ public static void DebuggerAttribute_Tests() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] public static void DebuggerAttribute_NullCollection_ThrowsArgumentNullException() { TargetInvocationException ex = Assert.Throws(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyObservableCollection), null)); diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 1aac4ed657d29..b5237feb3410a 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -242,11 +242,6 @@ - - - - -