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
Compare for equality, not approximate equality within a tolerance of 0.0.
IIRC, the behavior of the two differs only for:
- comparing NaN to itself
- comparing either infinity to itself
- comparing positive zero to negative zero
And as best I can tell, the only one of those that has any chance of coming up in these tests is the zero case. And, as best I can tell, in those cases, we actively want to test that we're returning positive zero, not negative zero. So let's test for that, and let's simplify the code in doing so.
(followup to cl/649135877; "followup" to cl/108355695, which ported these assertions from JUnit, known for steering users away from exact-equality comparisons)
RELNOTES=n/a
PiperOrigin-RevId: 649195688
0 commit comments