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
Running tests via command line, or running a program (not testing) will crash the process if a Debug.Assert condition fails, and it will pause the debugger if running under one. Both of these behaviors are what I expect and want. However, when running tests via VS testing the Debug.Assert just throws an exception. Which depending on the test could silently pass.
I see #2309 which is when this behavior changed. And while I still think the process should crash when not running under the debugger, I think at a minimum it should break under the debugger so you can see that one of your debug checks is failing.
I would love this to be implemented as exception and also a "note" to the test framework that the test failed even if the exception is swallowed. In retrospect the design implemented was not the best.
but this needs to be implemented on each test framework level, so we cannot do anything about it here, except for adding an option to disable the Assert failure captuing.
Running tests via command line, or running a program (not testing) will crash the process if a Debug.Assert condition fails, and it will pause the debugger if running under one. Both of these behaviors are what I expect and want. However, when running tests via VS testing the Debug.Assert just throws an exception. Which depending on the test could silently pass.
I see #2309 which is when this behavior changed. And while I still think the process should crash when not running under the debugger, I think at a minimum it should break under the debugger so you can see that one of your debug checks is failing.
See https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Diagnostics/DebugProvider.Unix.cs,18 for example.
The text was updated successfully, but these errors were encountered: