Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Enable tests blocked by IL2105 #57457

Merged
merged 7 commits into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<PublishTrimmed>true</PublishTrimmed>
<!-- Suppress linker warnings as these are tests -->
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
<!-- Can be removed when SDK update picks up https://github.com/dotnet/sdk/pull/18655. -->
<NoWarn>$(NoWarn);IL2111</NoWarn>
<NoWarn>$(NoWarn);IL2111;IL2105;IL2025</NoWarn>
<!-- https://github.com/dotnet/sdk/issues/18581 tracks needing to set 2 properties to disable warnings. -->
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> col = new ObservableCollection<int>(new[] {1, 2, 3, 4});
Expand All @@ -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<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ObservableCollection<int>), null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public void SerializeDeserialize_Roundtrips(ObservableCollection<int> 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<int>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<int, int> dict = new ReadOnlyDictionary<int, int>(new Dictionary<int, int>{{1, 2}, {2, 4}, {3, 6}});
Expand All @@ -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<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary<int, int>), null));
Expand All @@ -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<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyDictionary<int, int>.KeyCollection), new Type[] { typeof(int) }, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<int> col = new ReadOnlyObservableCollection<int>(new ObservableCollection<int>(new[] {1, 2, 3, 4}));
Expand All @@ -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<TargetInvocationException>(() => DebuggerAttributes.ValidateDebuggerTypeProxyProperties(typeof(ReadOnlyObservableCollection<int>), null));
Expand Down
5 changes: 0 additions & 5 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.DiagnosticSource\tests\System.Diagnostics.DiagnosticSource.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj" />

<!-- Issue: https://github.com/dotnet/runtime/issues/51602 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.ComponentModel.Primitives\tests\System.ComponentModel.Primitives.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.ObjectModel\tests\System.ObjectModel.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj" />

<!-- Issue: https://github.com/dotnet/runtime/issues/51708 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Linq.Expressions\tests\System.Linq.Expressions.Tests.csproj" />

Expand Down