Check calls t.Error if the condition is false. Also the text of the condition is printed.
(cond bool)
| 112 | // Check calls t.Error if the condition is false. Also |
| 113 | // the text of the condition is printed. |
| 114 | func (t *T) Check(cond bool) { |
| 115 | t.Helper() |
| 116 | if !cond { |
| 117 | t.failWithf(false, "check failed") |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | // CheckEqual checks that the value is equal to some reference. |
| 122 | func (t *T) CheckEqual(val, ref interface{}) { |