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

Method Equal

internal/is/is.go:32–43  ·  view source on GitHub ↗

Equal asserts that a and b are equal. func Test(t *testing.T) { is := is.New(t) a := greet("Mat") is.Equal(a, "Hi Mat") // greeting } Will output: your_test.go:123: Hey Mat != Hi Mat // greeting

(a interface{}, b interface{}, args ...interface{})

Source from the content-addressed store, hash-verified

30//
31// your_test.go:123: Hey Mat != Hi Mat // greeting
32func (is *I) Equal(a interface{}, b interface{}, args ...interface{}) {
33 if areEqual(a, b) {
34 return
35 }
36 if isNil(a) || isNil(b) {
37 is.logf("%s != %s%s", is.valWithType(a), is.valWithType(b), is.formatArgs(args))
38 } else if reflect.ValueOf(a).Type() == reflect.ValueOf(b).Type() {
39 is.logf("%v != %v%s", a, b, is.formatArgs(args))
40 } else {
41 is.logf("%s != %s%s", is.valWithType(a), is.valWithType(b), is.formatArgs(args))
42 }
43}
44
45// NoErr asserts that err is nil.
46//

Callers 15

TestStringFunction · 0.80
TestNoProjectFunction · 0.80
TestEmptyBuildFunction · 0.80
TestPublicFunction · 0.80
TestPluginFunction · 0.80
TestGetChangeGetFunction · 0.80
TestEmbedFaviconFunction · 0.80
TestGeneratorsFunction · 0.80
TestUpdateGeneratorFunction · 0.80
TestDeleteGeneratorFunction · 0.80
TestChangeGeneratorFunction · 0.80
TestPkgGeneratorFunction · 0.80

Calls 6

logfMethod · 0.95
valWithTypeMethod · 0.95
formatArgsMethod · 0.95
areEqualFunction · 0.85
isNilFunction · 0.85
TypeMethod · 0.65

Tested by 15

TestStringFunction · 0.64
TestNoProjectFunction · 0.64
TestEmptyBuildFunction · 0.64
TestPublicFunction · 0.64
TestPluginFunction · 0.64
TestGetChangeGetFunction · 0.64
TestEmbedFaviconFunction · 0.64
TestGeneratorsFunction · 0.64
TestUpdateGeneratorFunction · 0.64
TestDeleteGeneratorFunction · 0.64
TestChangeGeneratorFunction · 0.64
TestPkgGeneratorFunction · 0.64