Change t.Fail to t.Fatal

Fail* continues execution, right function probably Fatal*.
This commit is contained in:
legonian 2020-10-18 14:34:13 +03:00 committed by GitHub
parent 7d87b1b9f0
commit 71719ea0f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ func TestIntMinBasic(t *testing.T) {
ans := IntMin(2, -2)
if ans != -2 {
// `t.Error*` will report test failures but continue
// executing the test. `t.Fail*` will report test
// executing the test. `t.Fatal*` will report test
// failures and stop the test immediately.
t.Errorf("IntMin(2, -2) = %d; want -2", ans)
}