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

Function ObjectsAreEqual

internal/testify/assert/assertions.go:62–80  ·  view source on GitHub ↗

* Helper functions */ ObjectsAreEqual determines if two objects are considered equal. This function does no assertion of any kind.

(expected, actual interface{})

Source from the content-addressed store, hash-verified

60//
61// This function does no assertion of any kind.
62func ObjectsAreEqual(expected, actual interface{}) bool {
63 if expected == nil || actual == nil {
64 return expected == actual
65 }
66
67 exp, ok := expected.([]byte)
68 if !ok {
69 return reflect.DeepEqual(expected, actual)
70 }
71
72 act, ok := actual.([]byte)
73 if !ok {
74 return false
75 }
76 if exp == nil || act == nil {
77 return exp == nil && act == nil
78 }
79 return bytes.Equal(exp, act)
80}
81
82// copyExportedFields iterates downward through nested data structures and creates a copy
83// that only contains the exported struct fields.

Callers 10

TestObjectsAreEqualFunction · 0.85
TestBytesEqualFunction · 0.85
ObjectsAreEqualValuesFunction · 0.85
IsTypeFunction · 0.85
EqualFunction · 0.85
NotEqualFunction · 0.85
containsElementFunction · 0.85
SubsetFunction · 0.85
NotSubsetFunction · 0.85
diffListsFunction · 0.85

Calls 1

EqualMethod · 0.65

Tested by 2

TestObjectsAreEqualFunction · 0.68
TestBytesEqualFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…