MCPcopy
hub / github.com/dnote/dnote / checkEqual

Function checkEqual

pkg/assert/assert.go:47–61  ·  view source on GitHub ↗
(a, b interface{}, message string)

Source from the content-addressed store, hash-verified

45}
46
47func checkEqual(a, b interface{}, message string) (bool, string) {
48 if a == b {
49 return true, ""
50 }
51
52 var m string
53 if len(message) == 0 {
54 m = fmt.Sprintf("%v != %v", a, b)
55 } else {
56 m = message
57 }
58 errorMessage := getErrorMessage(m, a, b)
59
60 return false, errorMessage
61}
62
63// Equal errors a test if the actual does not match the expected
64func Equal(t *testing.T, a, b interface{}, message string) {

Callers 4

EqualFunction · 0.85
EqualfFunction · 0.85
NotEqualFunction · 0.85
NotEqualfFunction · 0.85

Calls 1

getErrorMessageFunction · 0.85

Tested by

no test coverage detected