Skip to content

Incorrect summary comments on Warn.If overloads #3811

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

Closed
rouacke opened this issue Apr 8, 2021 · 1 comment · Fixed by #3845
Closed

Incorrect summary comments on Warn.If overloads #3811

rouacke opened this issue Apr 8, 2021 · 1 comment · Fixed by #3845

Comments

@rouacke
Copy link

rouacke commented Apr 8, 2021

I believe a couple Warn.If overloads have incorrect summary comments.

https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Warn.cs#L335

https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Warn.cs#L335

The summary comments on those overloads read:

Asserts that a condition is true. If the condition is false, a warning is issued.

However, the method bodies read:

Warn.If(condition, Is.True, ...);

They log a warning if the condition is true.

The summary comment seems to be correct on other overloads:

Asserts that a condition is false. If the condition is true a warning is issued.

@rprouse
Copy link
Member

rprouse commented Apr 8, 2021

Good catch. That code has been there forever. It is surprising no one has noticed before you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants