MCPcopy
hub / github.com/stretchr/testify / Equal

Method Equal

assert/assertion_forward.go:142–147  ·  assert/assertion_forward.go::Assertions.Equal

Equal asserts that two objects are equal. a.Equal(123, 123) Pointer variable equality is determined based on the equality of the referenced values (as opposed to the memory addresses). Function equality cannot be determined and will always fail.

(expected interface{}, actual interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

140// referenced values (as opposed to the memory addresses). Function equality
141// cannot be determined and will always fail.
142func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
143 if h, ok := a.t.(tHelper); ok {
144 h.Helper()
145 }
146 return Equal(a.t, expected, actual, msgAndArgs...)
147}
148
149// EqualError asserts that a function returned an error (i.e. not `nil`)
150// and that it is equal to the provided error.

Callers 8

TestEqualWrapperFunction · 0.45
compareFunction · 0.45
TestHTTPSuccessFunction · 0.45
TestHTTPRedirectFunction · 0.45
TestHTTPErrorFunction · 0.45
TestHTTPStatusCodeFunction · 0.45
TestHTTPStatusesWrapperFunction · 0.45
ObjectsAreEqualFunction · 0.45

Calls 2

EqualFunction · 0.70
HelperMethod · 0.65

Tested by 6

TestEqualWrapperFunction · 0.36
TestHTTPSuccessFunction · 0.36
TestHTTPRedirectFunction · 0.36
TestHTTPErrorFunction · 0.36
TestHTTPStatusCodeFunction · 0.36
TestHTTPStatusesWrapperFunction · 0.36