Smocks
Smocks copied to clipboard
InvalidProgramException for setups for methods on value types on mono
When running the unit tests on mono (on linux), some unit tests fail because of an InvalidProgramException
. It appears that this happens for all unit tests that contain a setup that targets a method on a value type, such as Int32.GetHashCode
:
System.InvalidProgramException : Invalid IL code in Smocks.Tests.TargetMatchingTests:<Setup_AnyValueTypeTarget_MatchesAnyInstance>m__1 (Smocks.ISmocksContext): IL_0055: stloc.2
and
System.InvalidProgramException : Invalid IL code in Smocks.Tests.TargetMatchingTests/<Setup_ValueTypeTarget_MatchesOnlyEqualInstance>c__AnonStorey0:<>m__0 (Smocks.ISmocksContext): IL_0057: stloc.0