MCPcopy
hub / github.com/livebud/bud / NoErr

Method NoErr

internal/is/is.go:57–61  ·  view source on GitHub ↗

NoErr asserts that err is nil. func Test(t *testing.T) { is := is.New(t) val, err := getVal() is.NoErr(err) // getVal error is.True(len(val) > 10) // val cannot be short } Will output: your_test.go:123: err: not found // getVal error

(err error, args ...interface{})

Source from the content-addressed store, hash-verified

55//
56// your_test.go:123: err: not found // getVal error
57func (is *I) NoErr(err error, args ...interface{}) {
58 if err != nil {
59 is.logf("err: %s%s", err.Error(), is.formatArgs(args))
60 }
61}
62
63// New is a method wrapper around the New function.
64// It allows you to write subtests using a similar

Callers 15

TestNoProjectFunction · 0.80
TestEmptyBuildFunction · 0.80
TestPublicFunction · 0.80
TestPluginFunction · 0.80
TestGetChangeGetFunction · 0.80
TestEmbedFaviconFunction · 0.80
TestGeneratorsFunction · 0.80
TestMissingGeneratorFunction · 0.80
TestSyntaxErrorFunction · 0.80
TestUpdateGeneratorFunction · 0.80
TestDeleteGeneratorFunction · 0.80

Calls 3

logfMethod · 0.95
formatArgsMethod · 0.95
ErrorMethod · 0.65

Tested by 15

TestNoProjectFunction · 0.64
TestEmptyBuildFunction · 0.64
TestPublicFunction · 0.64
TestPluginFunction · 0.64
TestGetChangeGetFunction · 0.64
TestEmbedFaviconFunction · 0.64
TestGeneratorsFunction · 0.64
TestMissingGeneratorFunction · 0.64
TestSyntaxErrorFunction · 0.64
TestUpdateGeneratorFunction · 0.64
TestDeleteGeneratorFunction · 0.64