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

Method True

internal/is/is.go:100–104  ·  view source on GitHub ↗

True asserts that the expression is true. The expression code itself will be reported if the assertion fails. func Test(t *testing.T) { is := is.New(t) val := method() is.True(val != nil) // val should never be nil } Will output: your_test.go:123: not true: val != nil

(expr bool, args ...interface{})

Source from the content-addressed store, hash-verified

98//
99// your_test.go:123: not true: val != nil
100func (is *I) True(expr bool, args ...interface{}) {
101 if !expr {
102 is.logf("not true: ${1}%s", is.formatArgs(args))
103 }
104}
105
106// In asserts that item is contained within list.
107func (is *I) In(list interface{}, item interface{}, args ...interface{}) {

Callers 15

TestSyntaxErrorFunction · 0.80
TestDeleteGeneratorFunction · 0.80
TestChangeGeneratorFunction · 0.80
TestServeFileFunction · 0.80
TestNodeModulesFunction · 0.80
TestGenerateDirFunction · 0.80
TestUpdateFileFunction · 0.80
TestSvelteHelloFunction · 0.80
TestSvelteAwaitFunction · 0.80
TestSveltePropsFunction · 0.80
TestSvelteLocalImportsFunction · 0.80
TestUpdateFileFunction · 0.80

Calls 2

logfMethod · 0.95
formatArgsMethod · 0.95

Tested by 15

TestSyntaxErrorFunction · 0.64
TestDeleteGeneratorFunction · 0.64
TestChangeGeneratorFunction · 0.64
TestServeFileFunction · 0.64
TestNodeModulesFunction · 0.64
TestGenerateDirFunction · 0.64
TestUpdateFileFunction · 0.64
TestSvelteHelloFunction · 0.64
TestSvelteAwaitFunction · 0.64
TestSveltePropsFunction · 0.64
TestSvelteLocalImportsFunction · 0.64
TestUpdateFileFunction · 0.64