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

xUnit2005 not triggered when one parameter is null #2560

Closed
bjornhellander opened this issue Jul 29, 2022 · 3 comments · Fixed by xunit/xunit.analyzers#152
Closed

xUnit2005 not triggered when one parameter is null #2560

bjornhellander opened this issue Jul 29, 2022 · 3 comments · Fixed by xunit/xunit.analyzers#152

Comments

@bjornhellander
Copy link

Repro code:

Assert.Same(17, 18);
Assert.Same(17, null);
Assert.Same(null, 17);

Expected result:
xUnit2005 triggered for all asserts, since at least one of the values are of value type.

Actual result:
xUnit2005 only triggered for the first assert. (xUnit2003 is however triggered for the last one.)

xunit version: 2.4.1

@eli-entelis
Copy link
Contributor

Hi, I am a first time contributer, and would want to try and take this task, and would appreciate any help in starting

@Sevarius
Copy link

Sevarius commented Sep 10, 2022

@Eliminator1999 May I ask, are you still working on this issue?
If not, I would like to contribute)

@eli-entelis
Copy link
Contributor

go ahead 👍

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.

4 participants