// comparison method only valid if `t` and `u` are known to be on the same chain
353414
func (t proofTerm) lessThanOrEqual(u proofTerm) bool {
	return t.seqno() <= u.seqno()
}
984433
func (f Filter) LessThanOrEqual(val interface{}) Filter {
	f.Op = "<="
	f.Val = val
	return f
}
811542
func (t Time) CompareString(str string) (int, error) {
	// use MaxFsp to parse the string
	o, err := ParseTime(str, t.Type, MaxFsp)
	if err != nil {
		return 0, errors.Trace(err)
	}

	return t.Compare(o), nil
}
134140
func (s *String) Equal(value string) *String {
	if !(s.value == value) {
		s.chain.fail("\nexpected string equal to:\n %q\n\nbut got:\n %q",
			value, s.value)
	}
	return s
}
432656
func NotEqual(values ...interface{}) (failureMessage string) {
	if reflect.DeepEqual(values[0], values[1]) {
		failureMessage = fmt.Sprintf("Expected `%v` to not equal `%v`", values[0], values[1])
	}
	return
}
1288207
func StrsEquals(a, b []string) bool {
	if len(a) != len(b) {
		return false
	}
	sort.Strings(a)
	sort.Strings(b)
	for i, v := range a {
		if v != b[i] {
			return false
		}
	}
	return true
}
1211210
func (m MDBXLog) Compare(xlog1, xlog2 xlog.Position) (int, error) {
	if xlog1 == xlog2 {
		return 0, nil
	}
	pos1, err := parseXlog(xlog1)
	if err != nil {
		return 0, err
	}
	pos2, err := parseXlog(xlog2)
	if err != nil {
		return 0, err
	}
	if pos1 > pos2 {
		return 1, nil
	}
	return -1, nil
}
895357
func compare(name string, data interface{}, actualData []byte) error {
	expectedDataTmpl, err := ioutil.ReadFile(goldenFileName(name))

	if err != nil {
		if os.IsNotExist(err) {
			return newErrFixtureNotFound()
		}

		return fmt.Errorf("Expected %s to be nil", err.Error())
	}

	tmpl, err := template.New("test").Parse(string(expectedDataTmpl))
	if err != nil {
		return fmt.Errorf("Expected %s to be nil", err.Error())
	}

	var expectedData bytes.Buffer
	err = tmpl.Execute(&expectedData, data)
	if err != nil {
		return fmt.Errorf("Expected %s to be nil", err.Error())
	}

	if !bytes.Equal(actualData, expectedData.Bytes()) {
		return newErrFixtureMismatch(
			fmt.Sprintf("Result did not match the golden fixture.\n"+
				"Expected: %s\n"+
				"Got: %s",
				string(expectedData.Bytes()),
				string(actualData)))
	}

	return nil
}
588835
func (pkg *Package) Compare(other *Package) int {
	return Compare(pkg.Path, other.Path)
}
355892
func (s Slice) CompareString(value string) (int, error) {
	k, err := s.GetStringUTF8()
	if err != nil {
		return 0, WithStack(err)
	}
	return bytes.Compare(k, []byte(value)), nil
}
1339600
func (s *String) NotEqual(value string) *String {
	if !(s.value != value) {
		s.chain.fail("\nexpected string not equal to:\n %q", value)
	}
	return s
}
265188
func (cfg *Config) Compare(a, b interface{}) string {
	diffCfg := *cfg
	diffCfg.Diffable = true
	return diff.Diff(cfg.Sprint(a), cfg.Sprint(b))
}
719265
func (v Vector) LesserEqual(b Vector) bool {
	comp := v.Compare(b)
	return comp == Lesser || comp == Equal
}
817628
func (i *i) NotEqual(a, b interface{}) {
	if areEqual(a, b) {
		i.Logf("%v == %v", a, b)
	}
}
427948
func t(tags []string) string {
	t := ""
	if len(tags) > 0 {
		t = "|#" + strings.Join(tags, ",")
	}
	return t
}
902819
func (d *doubleIter) compare() (s comparison, err error) {
	s.sameHash = d.hashEqual(d.from.current, d.to.current)

	fromIsDir := d.from.current.IsDir()
	toIsDir := d.to.current.IsDir()

	s.bothAreDirs = fromIsDir && toIsDir
	s.bothAreFiles = !fromIsDir && !toIsDir
	s.fileAndDir = !s.bothAreDirs && !s.bothAreFiles

	fromNumChildren, err := d.from.current.NumChildren()
	if err != nil {
		return comparison{}, fmt.Errorf("from: %s", err)
	}

	toNumChildren, err := d.to.current.NumChildren()
	if err != nil {
		return comparison{}, fmt.Errorf("to: %s", err)
	}

	s.fromIsEmptyDir = fromIsDir && fromNumChildren == 0
	s.toIsEmptyDir = toIsDir && toNumChildren == 0

	return
}
47704
func (t *Triple) Equal(t2 *Triple) bool {
	return uuid.Equal(t.UUID(), t2.UUID())
}