MCPcopy
hub / github.com/expr-lang/expr / Equal

Function Equal

internal/testify/require/require.go:156–164  ·  view source on GitHub ↗

Equal asserts that two objects are equal. assert.Equal(t, 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.

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

Source from the content-addressed store, hash-verified

154// referenced values (as opposed to the memory addresses). Function equality
155// cannot be determined and will always fail.
156func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
157 if h, ok := t.(tHelper); ok {
158 h.Helper()
159 }
160 if assert.Equal(t, expected, actual, msgAndArgs...) {
161 return
162 }
163 t.FailNow()
164}
165
166// EqualError asserts that a function returned an error (i.e. not `nil`)
167// and that it is equal to the provided error.

Callers 15

Benchmark_lenFunction · 0.92
Benchmark_filterLenFunction · 0.92
Benchmark_filterFirstFunction · 0.92
Benchmark_filterLastFunction · 0.92
Benchmark_filterMapFunction · 0.92
Benchmark_arrayIndexFunction · 0.92
Benchmark_callFuncFunction · 0.92
Benchmark_callMethodFunction · 0.92
Benchmark_callFastFunction · 0.92
Benchmark_callConstExprFunction · 0.92
Benchmark_sortFunction · 0.92
Benchmark_sortByFunction · 0.92

Calls 3

EqualFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by 15

Benchmark_lenFunction · 0.74
Benchmark_filterLenFunction · 0.74
Benchmark_filterFirstFunction · 0.74
Benchmark_filterLastFunction · 0.74
Benchmark_filterMapFunction · 0.74
Benchmark_arrayIndexFunction · 0.74
Benchmark_callFuncFunction · 0.74
Benchmark_callMethodFunction · 0.74
Benchmark_callFastFunction · 0.74
Benchmark_callConstExprFunction · 0.74
Benchmark_sortFunction · 0.74
Benchmark_sortByFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…