MCPcopy Create free account
hub / github.com/Percona-Lab/mysql_random_data_load / Ok

Function Ok

testutils/testutils.go:207–216  ·  view source on GitHub ↗

ok fails the test if an err is not nil.

(tb testing.TB, err error, args ...interface{})

Source from the content-addressed store, hash-verified

205
206// ok fails the test if an err is not nil.
207func Ok(tb testing.TB, err error, args ...interface{}) {
208 if err != nil {
209 msg := fmt.Sprintf("%s: unexpected error: %s\n\n", caller(), err.Error())
210 if len(args) > 0 {
211 msg = fmt.Sprintf("%s: %s "+args[0].(string), append([]interface{}{caller(), err}, args[1:]...)) + "\n\n"
212 }
213 fmt.Println(msg)
214 tb.FailNow()
215 }
216}
217
218func NotOk(tb testing.TB, err error) {
219 if err == nil {

Callers

nothing calls this directly

Calls 1

callerFunction · 0.85

Tested by

no test coverage detected