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
From version 4.3.0 the numeric equality is type aware, where the type passed to Within must be the same as the type passed to EqualTo:
e.g.: Is.EqualTo(0L).Within(0.1)); result in an error as it isn't clear if the user wanted integral comparison (EqualTo(0L)) or floating point Within(0.1)
We can follow two paths:
Ignore the 0L and assume all comparison with a Within are double. This would need changing in NUnit.
Warn in the analyzer about the different types and allow a code fix to change 0L into 0.0. Or in case of a non-constant to add a cast.
The text was updated successfully, but these errors were encountered:
From version 4.3.0 the numeric equality is type aware, where the type passed to
Within
must be the same as the type passed toEqualTo
:e.g.:
Is.EqualTo(0L).Within(0.1));
result in an error as it isn't clear if the user wanted integral comparison (EqualTo(0L)
) or floating pointWithin(0.1)
We can follow two paths:
0L
and assume all comparison with aWithin
are double. This would need changing in NUnit.0L
into0.0
. Or in case of a non-constant to add a cast.The text was updated successfully, but these errors were encountered: