You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
have looked at the opencover output xml file in an attempt to resolve the issue.
reviewed the current issues to check that the issue isn't already known.
My issue is related to (check only those which apply):
32 or 64 bit support
Expected Behavior
Position get for item 'Goo'
Position set for item 'Goo'
Actual Behavior
Position get for item 'Goo'
Position set for item 'Bar'
Steps to reproduce the problem:
Compile the following with optimizations, and run it under OpenCover:
ImportsSystemInterfaceIMoveablePropertyPositionAsIntegerEndInterfaceClassItemImplementsIMoveablePublicPropertyNameAsStringPublicPropertyPositionAsIntegerImplementsIMoveable.PositionGetConsole.WriteLine("Position get for item '{0}'",Me.Name)Return0EndGetSetConsole.WriteLine("Position set for item '{0}'",Me.Name)EndSetEndPropertyEndClassClassProgramSharedSubMain()Dimitem=NewItemWith{.Name="Goo"}Shift(item)EndSubSharedSubShift(OfTAs{Class,IMoveable})(itemAsT)item.Position+=GetOffset(item)EndSubSharedFunctionGetOffset(OfT)(ByRefitemAsT)AsIntegeritem=DirectCast(DirectCast(NewItemWith{.Name="Bar"},IMoveable),T)Return0EndFunctionEndClass
@sharwell I put the above into a normal vb.net program and ran it without OpenCover and the output I got was
C:\projects\support\behaviour\behaviour\bin\Debug>behaviour.exe
Position get for item 'Goo'
Position set for item 'Bar'
Which looks correct to me - again I am not sure what the issue is since from what I can see OpenCover is making the code behave correctly. I suspect what you are trying to test is something broken in Roslyn due to optimizations being applied.
My Framework
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
Actual Behavior
Steps to reproduce the problem:
Compile the following with optimizations, and run it under OpenCover:
🔗 This code was taken from the following test, which fails only when Roslyn tests are executed with OpenCover.
https://github.com/dotnet/roslyn/blob/e123a4207123d5df8c45fb1caba0fb3acbae0e00/src/Compilers/VisualBasic/Test/Semantic/Semantics/CompoundAssignment.vb#L1094-L1195
The text was updated successfully, but these errors were encountered: