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

Method Equal

require/require_forward.go:143–148  ·  view source on GitHub ↗

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

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

Callers 6

TestRequireOneMethod · 0.45
TestRequireTwoMethod · 0.45
TestOneMethod · 0.45
TestSubtestMethod · 0.45
TestSomethingMethod · 0.45
TestEqualWrapperFunction · 0.45

Calls 2

EqualFunction · 0.70
HelperMethod · 0.65

Tested by 6

TestRequireOneMethod · 0.36
TestRequireTwoMethod · 0.36
TestOneMethod · 0.36
TestSubtestMethod · 0.36
TestSomethingMethod · 0.36
TestEqualWrapperFunction · 0.36