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

Remove SkipOn NetFramework attributes in System.Reflection.Emit tests #60103

Merged
merged 1 commit into from
Oct 7, 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
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public void DefineDynamicAssembly_NullName_ThrowsArgumentNullException()
}

[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The coreclr doesn't support Save or ReflectionOnly AssemblyBuilders.")]
[InlineData((AssemblyBuilderAccess)2)] // Save (not supported)
[InlineData((AssemblyBuilderAccess)2 | AssemblyBuilderAccess.Run)] // RunAndSave (not supported)
[InlineData((AssemblyBuilderAccess)6)] // ReflectionOnly (not supported)
Expand Down Expand Up @@ -174,18 +173,7 @@ public void DefineDynamicModule_InvalidName_ThrowsArgumentException(string name)
}

[Fact]
[SkipOnTargetFramework(~TargetFrameworkMonikers.NetFramework, "The coreclr only supports AssemblyBuilders with one module.")]
public void DefineDynamicModule_NetFxModuleAlreadyDefined_ThrowsInvalidOperationException()
{
AssemblyBuilder assembly = Helpers.DynamicAssembly();
assembly.DefineDynamicModule("module1");
assembly.DefineDynamicModule("module2");
AssertExtensions.Throws<ArgumentException>(null, () => assembly.DefineDynamicModule("module1"));
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The coreclr only supports AssemblyBuilders with one module.")]
public void DefineDynamicModule_CoreFxModuleAlreadyDefined_ThrowsInvalidOperationException()
public void DefineDynamicModule_ModuleAlreadyDefined_ThrowsInvalidOperationException()
{
AssemblyBuilder assembly = Helpers.DynamicAssembly();
assembly.DefineDynamicModule("module1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,16 @@ public static IEnumerable<object[]> SetConstant_ValueTypes_TestData()
[Theory]
[MemberData(nameof(SetConstant_ReferenceTypes_TestData))]
[MemberData(nameof(SetConstant_NullableValueTypes_TestData))]
public void SetConstant_Null_fully_supported(Type parameterType)
{
SetConstant_Null(parameterType);
}

[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Passing null for SetConstant on value types not supported on NETFX")]
[MemberData(nameof(SetConstant_ValueTypes_TestData))]
public void SetConstant_Null_not_supported_on_NETFX(Type parameterType)
public void SetConstant_Null_fully_supported(Type parameterType)
{
SetConstant_Null(parameterType);
}

[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Passing non-null value for SetConstant on nullable enum types not supported on NETFX")]
[InlineData(typeof(AttributeTargets?), AttributeTargets.All, (int)AttributeTargets.All)]
[InlineData(typeof(AttributeTargets?), (int)AttributeTargets.All, (int)AttributeTargets.All)]
public void SetConstant_NonNull_on_nullable_enum_not_supported_on_NETFX(Type parameterType, object valueToWrite, object expectedValueWhenRead)
public void SetConstant_NonNull_on_nullable_enum(Type parameterType, object valueToWrite, object expectedValueWhenRead)
{
SetConstant(parameterType, valueToWrite, expectedValueWhenRead);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ public interface InterfaceWithMethod

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49904", TestRuntimes.Mono)]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Static virtual interface methods not supported on .NET Framework")]
public void DefineMethodOverride_StaticVirtualInterfaceMethod()
{
AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Name"), AssemblyBuilderAccess.Run);
Expand All @@ -296,7 +295,6 @@ public void DefineMethodOverride_StaticVirtualInterfaceMethod()

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/49904", TestRuntimes.Mono)]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Static virtual interface methods not supported on .NET Framework")]
public void DefineMethodOverride_StaticVirtualInterfaceMethod_VerifyWithInterfaceMap()
{
AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Name"), AssemblyBuilderAccess.Run);
Expand Down