Assert calls t.Fatal if the condition is false. Also the text of the assertion is printed.
(cond bool)
| 85 | // Assert calls t.Fatal if the condition is false. Also |
| 86 | // the text of the assertion is printed. |
| 87 | func (t *T) Assert(cond bool) { |
| 88 | t.Helper() |
| 89 | if !cond { |
| 90 | t.failWithf(true, "assertion failed") |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | // AssertEqual asserts that the value is equal to some reference. |
| 95 | func (t *T) AssertEqual(val, ref interface{}) { |