// IsEqualName compares the value type name with one name.
5069
func IsEqualName(val reflect.Value, tname string) bool {
	return nameof(val.Type()) == tname
}
1325306
func LessThanOrEqual(a corev1.ResourceList, b corev1.ResourceList) (bool, []corev1.ResourceName) {
	result := true
	resourceNames := []corev1.ResourceName{}
	for key, value := range b {
		if other, found := a[key]; found {
			if other.Cmp(value) > 0 {
				result = false
				resourceNames = append(resourceNames, key)
			}
		}
	}
	return result, resourceNames
}
612609
func verifyIDEqualValue(expr *ast.BinaryExpr) (name string, value variableValue, err error) {
	id, ok := expr.X.(*ast.Ident)
	if !ok {
		err = errors.New("left operand of == must be identifier")
		return
	}
	name = id.Name

	val, ok := expr.Y.(*ast.BasicLit)
	if ok && val.Kind == token.INT {
		if i, parseErr := strconv.Atoi(val.Value); parseErr != nil {
			err = errors.New("right operand of == must be int or string value")
		} else {
			value.I = &i
		}
	} else if ok && val.Kind == token.STRING {
		// val.Value includes quotation marks, but we need just pure string.
		s := val.Value[1 : len(val.Value)-1]
		value.S = &s
	} else {
		err = errors.New("right operand of == must be int or string value")
	}
	return
}
786753
func StringEqual(t testing.TB, name string, act, exp interface{}) bool {
	actV, expV := reflect.ValueOf(act), reflect.ValueOf(exp)
	if actV.Kind() == reflect.Slice && expV.Kind() == reflect.Slice {
		return linesEqual(1, t, name, actV, expV)
	}
	actS, expS := fmt.Sprintf("%+v", act), fmt.Sprintf("%+v", exp)
	if actS == expS {
		return true
	}
	if strings.ContainsRune(actS, '\n') || strings.ContainsRune(expS, '\n') {
		return linesEqual(1, t, name,
			reflect.ValueOf(strings.Split(actS, "\n")),
			reflect.ValueOf(strings.Split(expS, "\n")))
	}
	msg := fmt.Sprintf("%s%s is expected to be %q, but got %q", assertPos(0), name,
		fmt.Sprint(exp), fmt.Sprint(act))
	if len(msg) >= 80 {
		msg = fmt.Sprintf("%s%s is expected to be\n  %q\nbut got\n  %q", assertPos(0), name,
			fmt.Sprint(exp), fmt.Sprint(act))
	}
	t.Error(msg)
	return false
}
934708
func (a *VaultConfig) IsEqual(b *VaultConfig) bool {
	if a == nil && b != nil {
		return false
	}
	if a != nil && b == nil {
		return false
	}

	if a.Token != b.Token {
		return false
	}
	if a.Role != b.Role {
		return false
	}
	if a.TaskTokenTTL != b.TaskTokenTTL {
		return false
	}
	if a.Addr != b.Addr {
		return false
	}
	if a.ConnectionRetryIntv.Nanoseconds() != b.ConnectionRetryIntv.Nanoseconds() {
		return false
	}
	if a.TLSCaFile != b.TLSCaFile {
		return false
	}
	if a.TLSCaPath != b.TLSCaPath {
		return false
	}
	if a.TLSCertFile != b.TLSCertFile {
		return false
	}
	if a.TLSKeyFile != b.TLSKeyFile {
		return false
	}
	if a.TLSServerName != b.TLSServerName {
		return false
	}
	if a.AllowUnauthenticated != b.AllowUnauthenticated {
		return false
	}
	if a.TLSSkipVerify != b.TLSSkipVerify {
		return false
	}
	if a.Enabled != b.Enabled {
		return false
	}
	return true
}
924559
func DisableExactOnAttributesEqual(o1, o2 *DisableExactOnAttributesOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
514196
func (e TypeExpr) TypeName(pkgOverride string) string {
	pkgName := FirstNonEmpty(pkgOverride, e.PkgName)
	if pkgName == "" {
		return e.Expr
	}
	return e.Expr[:e.pkgIndex] + pkgName + "." + e.Expr[e.pkgIndex:]
}
844560
func (e *ExtensionDescriptor) TypeName() (s []string) {
	name := e.GetName()
	if e.parent == nil {
		// top-level extension
		s = make([]string, 1)
	} else {
		pname := e.parent.TypeName()
		s = make([]string, len(pname)+1)
		copy(s, pname)
	}
	s[len(s)-1] = name
	return s
}
810792
func IsValidFieldName(name string) bool {
	if len(name) == 0 {
		return false
	}
	if strings.HasPrefix(name, "$") {
		return false
	}
	if strings.Contains(name, ".") {
		return false
	}
	return true
}
193067
func QueryTypeEqual(o1, o2 *QueryTypeOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1016655
func (as *Assertion) ToBeTheSame(value interface{}) {
	if !as.areTheSame(as.Value, value) {
		as.Test.PrintError(fmt.Sprintf("Expected `%v` to be the same instance as `%v`", as.Value, value))
	}
}
871456
func (e *Job) IsEqual(other *Job) bool {
	return e == other || (e.JobID == other.JobID &&
		e.ProjectID == other.ProjectID &&
		e.Flavor == other.Flavor &&
		e.Enabled == other.Enabled &&
		e.Paused == other.Paused &&
		e.Revision == other.Revision &&
		e.RevisionURL == other.RevisionURL &&
		e.Schedule == other.Schedule &&
		e.LastTriage.Equal(other.LastTriage) &&
		e.Acls.Equal(&other.Acls) &&
		bytes.Equal(e.Task, other.Task) &&
		equalSortedLists(e.TriggeredJobIDs, other.TriggeredJobIDs) &&
		e.Cron.Equal(&other.Cron) &&
		bytes.Equal(e.TriggeringPolicyRaw, other.TriggeringPolicyRaw) &&
		equalInt64Lists(e.ActiveInvocations, other.ActiveInvocations) &&
		bytes.Equal(e.FinishedInvocationsRaw, other.FinishedInvocationsRaw))
}
1223837
func IsFullyQualifiedName(fldPath *field.Path, name string) field.ErrorList {
	var allErrors field.ErrorList
	if len(name) == 0 {
		return append(allErrors, field.Required(fldPath, ""))
	}
	if errs := IsDNS1123Subdomain(name); len(errs) > 0 {
		return append(allErrors, field.Invalid(fldPath, name, strings.Join(errs, ",")))
	}
	if len(strings.Split(name, ".")) < 3 {
		return append(allErrors, field.Invalid(fldPath, name, "should be a domain with at least three segments separated by dots"))
	}
	return allErrors
}
824157
func (p *PublicKey) IsEqual(otherPubKey *PublicKey) bool {
	return p.X.Cmp(otherPubKey.X) == 0 &&
		p.Y.Cmp(otherPubKey.Y) == 0
}
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))
	}
}
1163791
func AllEqual(values ...string) bool {
	if len(values) < 2 {
		return true
	}
	compare := values[0]
	for _, v := range values[1:] {
		if v != compare {
			return false
		}
	}
	return true
}
760881
func (reg *typeRegistry) IsBaseTypeName(name TypeRef) bool {
	if name != "" {
		lower := strings.ToLower(string(name))
		for _, n := range namesBaseType {
			if lower == strings.ToLower(n) {
				return true
			}
		}
	}
	return false
}