Test commits the pending output if the condition is not true.
(condition bool)
| 199 | |
| 200 | // Test commits the pending output if the condition is not true. |
| 201 | func (a *Assertion) Test(condition bool) bool { |
| 202 | if !condition { |
| 203 | if a.level <= Error { |
| 204 | a.level = Error |
| 205 | } |
| 206 | a.Commit() |
| 207 | } |
| 208 | return condition |
| 209 | } |
| 210 | |
| 211 | // TestDeepEqual adds the entries for Got and Expect, then tests if they are the |
| 212 | // same using compare.DeepEqual, commiting if they are not. |