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
Using Debug.Assert may crash Xunit with a mangled exception message #1482
Comments
It'll break when run with right-click Debug Test and succeed after continuing from there and fail as described with right-click Run from Test Explorer or when run with |
The |
Well yes but where is the reason string coming from? Its consistently wrong and it wasn't clear to me why this happened. If I would've known it was due to the Debug.Assert failing, I would've given priority to fixing that issue in my own code instead of fighting with test explorer and narrowing this down and writing test cases for Unsafe.AsRef and so forth. I assumed there was a memory corruption, after all. I think there still is one. It just has nothing to do with my code. The differences in the reason message, by the way, is due to using 3 different versions of Xunit. I've had the one from June, the beta5 and just today or yesterday the rc1. |
I don't know where the reason string is coming from. "The active test run was aborted" is a message that comes from VSTest, not xUnit.net. |
Mmm, so this is an issue with VSTest. If I run this test with |
Right-click Run test from Test Explorer may crash Xunit with a mangled exception message, do nothing, or occassionally succeed if the test contains a call to
Debug.Assert
that fails.The Ouput window contains the following output
The text was updated successfully, but these errors were encountered: