// Exactly asserts that two objects are equal is value and type.
// 
//    a.Exactly(int32(123), int64(123), "123 and 123 should NOT be equal")
// 
// Returns whether the assertion was successful (true) or not (false).
516272
func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
	Exactly(a.t, expected, actual, msgAndArgs...)
}
766486
func (o *TypoToleranceOption) Equal(o2 *TypoToleranceOption) bool {
	if o2 == nil {
		return o.value == typoToleranceTrue
	}
	return o.value == o2.value
}
443687
func AssertType(expected interface{}, result interface{}) {
	expectedType := reflect.TypeOf(expected)
	resultType := reflect.TypeOf(result)
	if expectedType != resultType {
		err := "Error: [AssertEqual] Mismatched Types"
		err = fmt.Sprintf("%s\nExpected Value Type: %v\nResult: %v", err, expectedType, resultType)
		panic(err)
	}
}
207261
func (o *TypeOption) Equal(o2 *TypeOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
352211
func Equals(a, b error) bool {
	if a == nil && b == nil {
		// Both are nil.
		return true
	}

	if a == nil || b == nil {
		// One of the two is nil, since we know both are not nil.
		return false
	}

	return a.Error() == b.Error() && Code(a) == Code(b)
}
466954
func (self IntEqualer) Equal(e Equaler) bool {
	return self.I == e.(IntEqualer).I
}
1255767
func (t SimpleType) Equal(u convert.Equaler) bool {
	other, ok := u.(SimpleType)
	if !ok {
		return false
	}
	if t.DefaultValue != other.DefaultValue {
		return false
	}
	return t.Kind == other.Kind
}
946619
func (v *ListTypeVersioningV1) Equals(rhs *ListTypeVersioningV1) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.Myints == nil && rhs.Myints == nil) || (v.Myints != nil && rhs.Myints != nil && _List_I32_Equals(v.Myints, rhs.Myints))) {
		return false
	}
	if !_String_EqualsPtr(v.Hello, rhs.Hello) {
		return false
	}

	return true
}
733976
func (str String) Equal(other Value) bool {
	switch other := other.(type) {
	case String:
		return str == other
	default:
		return false
	}
}
585989
func (self BoolEqualer) Equal(e Equaler) bool {
	return self.B == e.(BoolEqualer).B
}
96756
func (a *AttributeTypeAndValue) Equal(other *AttributeTypeAndValue) bool {
	return strings.EqualFold(a.Type, other.Type) && a.Value == other.Value
}
503033
func equals(v1, v2 interface{}) bool {
	v1Type := jsonType(v1)
	if v1Type != jsonType(v2) {
		return false
	}
	switch v1Type {
	case "array":
		arr1, arr2 := v1.([]interface{}), v2.([]interface{})
		if len(arr1) != len(arr2) {
			return false
		}
		for i := range arr1 {
			if !equals(arr1[i], arr2[i]) {
				return false
			}
		}
		return true
	case "object":
		obj1, obj2 := v1.(map[string]interface{}), v2.(map[string]interface{})
		if len(obj1) != len(obj2) {
			return false
		}
		for k, v1 := range obj1 {
			if v2, ok := obj2[k]; ok {
				if !equals(v1, v2) {
					return false
				}
			} else {
				return false
			}
		}
		return true
	case "number":
		num1, _ := new(big.Float).SetString(string(v1.(json.Number)))
		num2, _ := new(big.Float).SetString(string(v2.(json.Number)))
		return num1.Cmp(num2) == 0
	default:
		return v1 == v2
	}
}
830868
func (c *Characteristic) Equal(other interface{}) bool {
	if characteristic, ok := other.(*Characteristic); ok == true {
		// The value type (e.g. float32, bool,...) of property `Value` may be different even though
		// they look the same. They are equal when they have the same string representation.
		value := fmt.Sprintf("%+v", c.Value)
		otherValue := fmt.Sprintf("%+v", characteristic.Value)

		return value == otherValue && c.ID == characteristic.ID && c.Type == characteristic.Type && len(c.Perms) == len(characteristic.Perms) && c.Description == characteristic.Description && c.Format == characteristic.Format && c.Unit == characteristic.Unit && c.MaxLen == characteristic.MaxLen && c.MaxValue == characteristic.MaxValue && c.MinValue == characteristic.MinValue && c.StepValue == characteristic.StepValue && c.Events == characteristic.Events
	}

	return false
}
767655
func Equal(t testing.TB, v1, v2 interface{}, args ...interface{}) {
	assert(t, IsEqual(v1, v2), args, []interface{}{"Equal 失败，实际值为v1=[%T:%[1]v];v2=[%T:%[2]v]", v1, v2})
}
1072146
func (v *Oid) Equal(o *Oid) bool {
	if o == nil {
		return false
	}
	return v.Value.Equal(o.Value)
}
1160840
func (o *AllowCompressionOfIntegerArrayOption) Equal(o2 *AllowCompressionOfIntegerArrayOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
1189849
func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
	return EqualValues(a.t, expected, actual, msgAndArgs...)
}