Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Merge pull request #14604 from hughbe/lightweight-desktop
Browse files Browse the repository at this point in the history
Support System.Reflection.Emit.ILGeneration tests on the full .NET Framework
  • Loading branch information
stephentoub authored Jan 3, 2017
2 parents 478a769 + ebfbb9c commit 4b039b4
Showing 1 changed file with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class DynamicMethodGetILGenerator1
[Theory]
[InlineData(true)]
[InlineData(false)]
public void ILGenerator_Int_Type(bool skipVisibility)
public void GetILGenerator_Int_Owner(bool skipVisibility)
{
IDClass target = new IDClass();
FieldInfo field = typeof(IDClass).GetField(FieldName, BindingFlags.Instance | BindingFlags.NonPublic);
Expand All @@ -28,10 +28,16 @@ public void ILGenerator_Int_Type(bool skipVisibility)
VerifyILGenerator(instanceCallBack, target, 0);
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The coreclr ignores the skipVisibility value of DynamicMethod.")]
public void GetILGenerator_Int_Module_CoreclrIgnoresSkipVisibility()
{
GetILGenerator_Int_Module(skipVisibility: false);
}

[Theory]
[InlineData(true)]
[InlineData(false)]
public void ILGenerator_Int_Module(bool skipVisibility)
public void GetILGenerator_Int_Module(bool skipVisibility)
{
Module module = typeof(IDClass).GetTypeInfo().Module;
IDClass target = new IDClass();
Expand All @@ -50,7 +56,7 @@ public void ILGenerator_Int_Module(bool skipVisibility)
[Theory]
[InlineData(true)]
[InlineData(false)]
public void GetILGenerator_Type(bool skipVisibility)
public void GetILGenerator_Owner(bool skipVisibility)
{
IDClass target = new IDClass();
FieldInfo field = typeof(IDClass).GetField(FieldName, BindingFlags.Instance | BindingFlags.NonPublic);
Expand All @@ -66,9 +72,15 @@ public void GetILGenerator_Type(bool skipVisibility)
VerifyILGenerator(instanceCallBack, target, 0);
}

[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "The coreclr ignores the skipVisibility value of DynamicMethod.")]
public void GetILGenerator_Module_CoreclrIgnoresSkipVisibility()
{
GetILGenerator_Module(skipVisibility: false);
}

[Theory]
[InlineData(true)]
[InlineData(false)]
public void GetILGenerator_Module(bool skipVisibility)
{
Module module = typeof(TestClass).GetTypeInfo().Module;
Expand Down

0 comments on commit 4b039b4

Please sign in to comment.