We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi! We ran into a small isue today with require.InEpsilon, at version 1.5.1
require.InEpsilon
func TestInEpsilonNaN(t *testing.T) { require.InEpsilon(t, 42, math.NaN(), 1) }
Actual result : test passes
Expected result : an error
The text was updated successfully, but these errors were encountered:
This is highly similar to #162
I'll make a PR with the equivalent changes
Sorry, something went wrong.
Make InEpsilon fail when given a NaN
0129674
fixes #918
func TestInEpsilon1(t *testing.T) { div := 0.0 require.InEpsilon(t, 1, 1/div, 0.001) } func TestInEpsilon2(t *testing.T) { div := 0.0 require.InEpsilon(t, 1/div, 1, 0.001) }
> go test -v -run InEps | grep -E '(PASS|FAIL)' --- FAIL: TestInEpsilon1 (0.00s) --- PASS: TestInEpsilon2 (0.00s)
Successfully merging a pull request may close this issue.
Hi! We ran into a small isue today with
require.InEpsilon
, at version 1.5.1Actual result : test passes
Expected result : an error
The text was updated successfully, but these errors were encountered: