Skip to content

Commit

Permalink
re-approve
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Apr 1, 2018
1 parent 1fa2968 commit dc2b7d9
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 43 deletions.
1 change: 1 addition & 0 deletions AssemblyToProcess/AssemblyToProcess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<DisableFody>true</DisableFody>
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Ionad\Ionad.csproj" />
Expand Down
13 changes: 5 additions & 8 deletions Tests/ModuleWeaverTests.ClassWithBrokenReplacement.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@
.method public hidebysig instance void
Method() cil managed
{
// Code size 8 (0x8)
// Code size 6 (0x6)
.maxstack 0
IL_0000: nop
IL_0001: call void StaticBasic::SomeMethod()
IL_0006: nop
IL_0007: ret
IL_0000: call void StaticBasic::SomeMethod()
IL_0005: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
// Code size 7 (0x7)
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
IL_0006: ret
}
}
27 changes: 8 additions & 19 deletions Tests/ModuleWeaverTests.ClassWithDateTime.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
.method public hidebysig instance valuetype [mscorlib]System.DateTime
GetDateTime() cil managed
{
// Code size 11 (0xb)
// Code size 6 (0x6)
.maxstack 1
.locals init (valuetype [mscorlib]System.DateTime V_0)
IL_0000: nop
IL_0001: call valuetype [mscorlib]System.DateTime DateTimeReplacement::get_Now()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
IL_0000: call valuetype [mscorlib]System.DateTime DateTimeReplacement::get_Now()
IL_0005: ret
}
.method public hidebysig specialname instance valuetype [mscorlib]System.DateTime
get_SomeProperty() cil managed
Expand All @@ -25,25 +20,19 @@
.method public hidebysig instance valuetype [mscorlib]System.DateTime
MissingReplacement() cil managed
{
// Code size 11 (0xb)
// Code size 6 (0x6)
.maxstack 1
.locals init (valuetype [mscorlib]System.DateTime V_0)
IL_0000: nop
IL_0001: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Today()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
IL_0000: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Today()
IL_0005: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
// Code size 7 (0x7)
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
IL_0006: ret
}
.property instance valuetype [mscorlib]System.DateTime
SomeProperty()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.class public auto ansi beforefieldinit ClassWithGenericMethodUsage
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Method() cil managed
{
// Code size 8 (0x8)
.maxstack 1
IL_0000: nop
IL_0001: call !!0 StaticWithGenericMethodReplacement::Method<string>()
IL_0006: pop
IL_0007: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.class public auto ansi beforefieldinit ClassWithGenericMethodUsage
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Method() cil managed
{
// Code size 7 (0x7)
.maxstack 1
IL_0000: call !!0 StaticWithGenericMethodReplacement::Method<string>()
IL_0005: pop
IL_0006: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
}
}
14 changes: 6 additions & 8 deletions Tests/ModuleWeaverTests.ClassWithGenericMethodUsage.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@
.method public hidebysig instance void
Method() cil managed
{
// Code size 8 (0x8)
// Code size 7 (0x7)
.maxstack 1
IL_0000: nop
IL_0001: call !!0 StaticWithGenericMethodReplacement::Method<string>()
IL_0006: pop
IL_0007: ret
IL_0000: call !!0 StaticWithGenericMethodReplacement::Method<string>()
IL_0005: pop
IL_0006: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
// Code size 7 (0x7)
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
IL_0006: ret
}
}
13 changes: 5 additions & 8 deletions Tests/ModuleWeaverTests.ClassWithGenericUsage.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@
.method public hidebysig instance void
Method() cil managed
{
// Code size 8 (0x8)
// Code size 6 (0x6)
.maxstack 0
IL_0000: nop
IL_0001: call void class StaticGenericReplacement`1<string>::SomeMethod()
IL_0006: nop
IL_0007: ret
IL_0000: call void class StaticGenericReplacement`1<string>::SomeMethod()
IL_0005: ret
}
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
// Code size 7 (0x7)
.maxstack 1
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
IL_0006: ret
}
}

0 comments on commit dc2b7d9

Please sign in to comment.