Assert .
(t testingT, cond bool, val ...interface{})
| 28 | |
| 29 | // Assert . |
| 30 | func Assert(t testingT, cond bool, val ...interface{}) { |
| 31 | t.Helper() |
| 32 | if !cond { |
| 33 | if len(val) > 0 { |
| 34 | val = append([]interface{}{"assertion failed:"}, val...) |
| 35 | t.Fatal(val...) |
| 36 | } else { |
| 37 | t.Fatal("assertion failed") |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | // Assertf . |
| 43 | func Assertf(t testingT, cond bool, format string, val ...interface{}) { |
searching dependent graphs…