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

Fix NaN behavior for Assert.AreEqual/AreNotEqual #4536

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Jan 7, 2025

Running the new tests on main, there are 14 failures. 7 are for float and 7 are for double. I'll list the test names for float failures only as the double ones are exact mirror.

DoubleAreEqual_ExpectedIsNaN_ActualIsNaN_DeltaIsNumeric_ShouldPass
DoubleAreNotEqual_ExpectedIsNaN_ActualIsNaN_DeltaIsNaN_ShouldFail
DoubleAreNotEqual_ExpectedIsNaN_ActualIsNaN_DeltaIsNumeric_ShouldFail
DoubleAreNotEqual_ExpectedIsNaN_ActualIsNumeric_DeltaIsNaN_ShouldFail
DoubleAreNotEqual_ExpectedIsNumeric_ActualIsNaN_DeltaIsNaN_ShouldFail
DoubleAreNotEqual_ExpectedIsNumeric_ActualIsNumeric_ExpectedAndActualEquals_DeltaIsNaN_ShouldFail
DoubleAreNotEqual_ExpectedIsNumeric_ActualIsNumeric_ExpectedAndActualNotEquals_DeltaIsNaN_ShouldFail

Fixes #4530

@Evangelink
Copy link
Member

Flaky test unrelated to this PR. Force merging.

@Evangelink Evangelink merged commit 1d43f8b into microsoft:main Jan 7, 2025
8 of 10 checks passed
@Youssef1313 Youssef1313 deleted the assert-nan branch January 7, 2025 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assert.AreEqual/AreNotEqual don't handle NaN correctly
2 participants