// EqualValues asserts that two objects are equal or convertable to the same types
// and equal.
//
//    assert.EqualValues(t, uint32(123), int32(123))
497753
func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.EqualValues(t, expected, actual, msgAndArgs...) {
		return
	}
	t.FailNow()
}
1128336
func Equal(l, r interface{}) bool {
	if l == nil || r == nil {
		return false
	}
	switch val := l.(type) {
	case *Error:
		return val.Equal(r)
	case error:
		return newError(val, 2).(*Error).Equal(r)
	default:
		panic("invalid type, must be *Error")
	}
}
1291040
func Equal(values ...interface{}) (failureMessage string) {
	if !reflect.DeepEqual(values[0], values[1]) {
		failureMessage = fmt.Sprintf("Expected `%v` to equal `%v`", values[0], values[1])
	}
	return
}
1365691
func (wib Board) EqualValue(u convert.Equaler) bool {
	other, ok := u.(Board)
	if !ok {
		return false
	}
	wib.Lifecycle = other.Lifecycle
	return wib.Equal(u)
}
1202412
func bindValues(keyvals []interface{}) {
	for i := 1; i < len(keyvals); i += 2 {
		if v, ok := keyvals[i].(Valuer); ok {
			keyvals[i] = v()
		}
	}
}
1159114
func Equal(l, r Value) (bool, error) {

	if l == nil && r == nil {
		return true, nil
	}

	if r == nil {
		switch l.(type) {
		case NilValue:
			return true, nil
		}
		return false, nil
	}
	if _, isNil := r.(NilValue); isNil {
		switch l.(type) {
		case nil:
			return true, nil
		case NilValue:
			return true, nil
		}
		return false, nil
	}

	switch lt := l.(type) {
	case nil, NilValue:
		return false, nil
	case StringValue:
		if lt.Val() == r.ToString() {
			return true, nil
		}
		return false, nil
	case IntValue:
		rhv, _ := ValueToInt64(r)
		return lt.Val() == rhv, nil
	case NumberValue:
		rhv, _ := ValueToFloat64(r)
		return lt.Val() == rhv, nil
	case BoolValue:
		rhv, _ := ValueToBool(r)
		return lt.Val() == rhv, nil
	case TimeValue:
		rhv, _ := ValueToTime(r)
		return lt.Val() == rhv, nil
	case Slice:
		if rhv, ok := r.(Slice); ok {
			if lt.Len() != rhv.Len() {
				return false, nil
			}
			rhslice := rhv.SliceValue()
			for i, lhval := range lt.SliceValue() {
				if eq, err := Equal(lhval, rhslice[i]); !eq || err != nil {
					return false, nil
				}
			}
			return true, nil
		}
	}
	return false, fmt.Errorf("Could not evaluate equals for %v = %v", l.Value(), r.Value())
}
680843
func primitiveEquals(i *interpreter, trace TraceElement, x, y value) (value, error) {
	if x.getType() != y.getType() {
		return makeValueBoolean(false), nil
	}
	switch left := x.(type) {
	case *valueBoolean:
		right, err := i.getBoolean(y, trace)
		if err != nil {
			return nil, err
		}
		return makeValueBoolean(left.value == right.value), nil
	case *valueNumber:
		right, err := i.getNumber(y, trace)
		if err != nil {
			return nil, err
		}
		return makeValueBoolean(left.value == right.value), nil
	case *valueString:
		right, err := i.getString(y, trace)
		if err != nil {
			return nil, err
		}
		return makeValueBoolean(stringEqual(left, right)), nil
	case *valueNull:
		return makeValueBoolean(true), nil
	case *valueFunction:
		return nil, i.Error("Cannot test equality of functions", trace)
	default:
		return nil, i.Error(
			"primitiveEquals operates on primitive types, got "+x.getType().name,
			trace,
		)
	}
}
1187760
func (o *MaxValuesPerFacetOption) Equal(o2 *MaxValuesPerFacetOption) bool {
	if o2 == nil {
		return o.value == 100
	}
	return o.value == o2.value
}
787738
func (o *SafeOption) Equal(o2 *SafeOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
488907
func (o *SortFacetValuesByOption) Equal(o2 *SortFacetValuesByOption) bool {
	if o2 == nil {
		return o.value == "count"
	}
	return o.value == o2.value
}
457292
func (o *ClearExistingRulesOption) Equal(o2 *ClearExistingRulesOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
26146
func (is *Is) EqualType(expected, actual interface{}) {
	is.TB.Helper()
	if reflect.TypeOf(expected) != reflect.TypeOf(actual) {
		fail(is, "expected objects '%s' to be of the same type as object '%s'", objectTypeName(expected), objectTypeName(actual))
	}
}
1022452
func (wi WorkItemStorage) EqualValue(u convert.Equaler) bool {
	other, ok := u.(WorkItemStorage)
	if !ok {
		return false
	}
	wi.Version = other.Version
	wi.Lifecycle = other.Lifecycle
	wi.RelationShipsChangedAt = other.RelationShipsChangedAt
	return wi.Equal(u)
}
265127
func (t WorkItemLinkType) EqualValue(u convert.Equaler) bool {
	other, ok := u.(WorkItemLinkType)
	if !ok {
		return false
	}
	t.Version = other.Version
	t.Lifecycle = other.Lifecycle
	return t.Equal(u)
}
690180
func EqualWith(l, r u.JsonHelper) bool {
	if len(l) != len(r) {
		return false
	}
	if len(l) == 0 && len(r) == 0 {
		return true
	}
	for k, lv := range l {
		rv, ok := r[k]
		if !ok {
			return false
		}
		switch lvt := lv.(type) {
		case int, int64, int32, string, bool, float64:
			if lv != rv {
				return false
			}
		case u.JsonHelper:
			rh, isHelper := rv.(u.JsonHelper)
			if !isHelper {
				return false
			}
			if !EqualWith(lvt, rh) {
				return false
			}
		case map[string]interface{}:
			rh, isHelper := rv.(u.JsonHelper)
			if !isHelper {
				return false
			}
			if !EqualWith(u.JsonHelper(lvt), rh) {
				return false
			}
		default:
			u.Warnf("unhandled type comparison: %T", lv)
		}

	}
	return true
}
144665
func (t EnumType) EqualValue(u convert.Equaler) bool {
	return t.Equal(u)
}
1072146
func (v *Oid) Equal(o *Oid) bool {
	if o == nil {
		return false
	}
	return v.Value.Equal(o.Value)
}