Skip to content
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

Debug.Assert in unit tests opens a dialog when run from the command-line #1077

Closed
333fred opened this issue Jan 5, 2017 · 2 comments
Closed
Labels
Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. Triage-Approved Reviewed and prioritized
Milestone

Comments

@333fred
Copy link
Member

333fred commented Jan 5, 2017

Our listener for replacing the Debug.Assert popup isn't working when running tests from the CLI. We need to fix this to allow us to test these conditions from the command line by doing one of two things (quoting @davkean):

  1. create a "xunit framework" that wraps regular xunit but puts in a call to add the listener
  2. Change xunit's runner app.config to include the listener.
    • ie copy xunit to some directory, modify the app.config. run
@davkean davkean changed the title Cannot hit code with an Assumes in unit tests Debug.Assert in unit tests opens a dialog when run from the command-line Jan 5, 2017
@davkean
Copy link
Member

davkean commented Jan 5, 2017

We have a debug trace listener (see src\Common\Test\App.config) that's supposed to prevent it from opening, but this only works inside VS. From the command-line, xunit.AppDomain option is turned off ("denied") which prevents xunit from seeing the App.config settings that apply to a given AppDomain. We can turn it back on but then run the risk of running into dotnet/roslyn#6358 again.

@srivatsn srivatsn added the Bug label Jan 11, 2017
@srivatsn srivatsn added this to the 1.1 milestone Jan 11, 2017
@srivatsn srivatsn modified the milestones: 16.0, 15.3 Apr 2, 2017
@jjmew jjmew added the Triage-Approved Reviewed and prioritized label Jan 30, 2019
@jjmew jjmew modified the milestones: 16.0, Backlog Jan 30, 2019
@davkean
Copy link
Member

davkean commented Feb 1, 2020

This was fixed, Debug.Assert now throws an exception when run from command-line.

@davkean davkean closed this as completed Feb 1, 2020
@davkean davkean modified the milestones: Backlog, 16.0 Feb 1, 2020
@davkean davkean added the Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. label Feb 1, 2020
@drewnoakes drewnoakes removed the Bug label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Fixed The bug has been fixed, refer to the milestone to see in which release it was fixed. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

No branches or pull requests

5 participants