Change t.Fail to t.Fatal
Fail* continues execution, right function probably Fatal*.
This commit is contained in:
parent
7d87b1b9f0
commit
71719ea0f3
@ -31,7 +31,7 @@ func TestIntMinBasic(t *testing.T) {
|
|||||||
ans := IntMin(2, -2)
|
ans := IntMin(2, -2)
|
||||||
if ans != -2 {
|
if ans != -2 {
|
||||||
// `t.Error*` will report test failures but continue
|
// `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.
|
// failures and stop the test immediately.
|
||||||
t.Errorf("IntMin(2, -2) = %d; want -2", ans)
|
t.Errorf("IntMin(2, -2) = %d; want -2", ans)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user