// NotEmpty succeeds if submatches array is non-empty.
//
// Example:
//  m := NewMatch(t, submatches, names)
//  m.NotEmpty()
4913
func (m *Match) NotEmpty() *Match {
	if len(m.submatches) == 0 {
		m.chain.fail("expected non-zero submatches")
	}
	return m
}
411318
func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}

	pass := isEmpty(object)
	if !pass {
		Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...)
	}

	return pass

}
94293
func NewAttemptFinished(result *JsonResult) *Attempt {
	return &Attempt{
		Data: &Attempt_Data{
			AttemptType: &Attempt_Data_Finished_{
				&Attempt_Data_Finished{Data: result}}}}
}
963800
func StringNotEmpty(obtained, paramName string) Checker {
	return func() (isNotEmpty bool, errMsg string) {
		isNotEmpty = obtained != ""
		errMsg = fmt.Sprintf("Parameter is an empty string: %s", paramName)
		return
	}
}
790434
func (t *T) NotEqualf(have, unwanted interface{}, spec string, args ...interface{}) {
	prefix := fmt.Sprintf(spec, args...) + ": "
	t.notEqualPrefix_(have, unwanted, prefix)
}
1121014
func dirEmpty(dirPath string) (bool, error) {
	f, err := os.Open(dirPath)
	if err != nil {
		return false, err
	}
	defer f.Close()

	// Read the names of a max of one entry from the directory.  When the
	// directory is empty, an io.EOF error will be returned, so allow it.
	names, err := f.Readdirnames(1)
	if err != nil && err != io.EOF {
		return false, err
	}

	return len(names) == 0, nil
}
185040
func (enc *Encoder) IntNullEmpty(v int) {
	enc.grow(10)
	r := enc.getPreviousRune()
	if r != '[' {
		enc.writeByte(',')
	}
	if v == 0 {
		enc.writeBytes(nullBytes)
		return
	}
	enc.buf = strconv.AppendInt(enc.buf, int64(v), 10)
}
552573
func (enc *Encoder) SQLNullBoolOmitEmpty(v *sql.NullBool) {
	if v != nil && v.Valid && v.Bool != false {
		enc.Bool(v.Bool)
	}
}
658505
func ValidateNotEmpty(value interface{}) error {
	if typeutil.IsEmpty(value) {
		return fmt.Errorf("expected non-empty value, got: %v", value)
	}

	return nil
}
981520
func (enc *Encoder) StringKeyNullEmpty(key, v string) {
	if enc.hasKeys {
		if !enc.keyExists(key) {
			return
		}
	}
	enc.grow(len(key) + len(v) + 5)
	r := enc.getPreviousRune()
	if r != '{' {
		enc.writeTwoBytes(',', '"')
	} else {
		enc.writeByte('"')
	}
	enc.writeStringEscape(key)
	enc.writeBytes(objKey)
	if v == "" {
		enc.writeBytes(nullBytes)
		return
	}
	enc.writeByte('"')
	enc.writeStringEscape(v)
	enc.writeByte('"')
}
1191581
func (c WriteCondition) IfEmpty(key []string) WriteCondition {
	return c.add(key, func(wc *writeCondition) {
		wc.OldEmpty = &condTrue
	})
}
558510
func removeCurrentIfEmpty(head **sequence, previous, current *sequence) {
	if current.count == 0 {
		if current == *head {
			*head = current.next
		} else {
			previous.next = current.next
			current = current.next
		}
	}
}
772437
func (enc *Encoder) ArrayNullEmpty(v MarshalerJSONArray) {
	enc.grow(4)
	r := enc.getPreviousRune()
	if r != '[' {
		enc.writeByte(',')
	}
	if v.IsNil() {
		enc.writeBytes(nullBytes)
		return
	}
	enc.writeByte('[')
	v.MarshalJSONArray(enc)
	enc.writeByte(']')
}
114975
func NotExist(values ...interface{}) (failureMessage string) {
	if !isNil(values[0]) {
		failureMessage = fmt.Sprintf("Expected `%v` is exist.", values[0])
	}
	return
}
1363684
func (enc *Encoder) AddStringKeyNullEmpty(key, v string) {
	enc.StringKeyNullEmpty(key, v)
}
1579
func PostingsForMatchers(ix IndexReader, ms ...labels.Matcher) (index.Postings, error) {
	var its, notIts []index.Postings
	// See which label must be non-empty.
	labelMustBeSet := make(map[string]bool, len(ms))
	for _, m := range ms {
		if !m.Matches("") {
			labelMustBeSet[m.Name()] = true
		}
	}

	for _, m := range ms {
		matchesEmpty := m.Matches("")
		if labelMustBeSet[m.Name()] || !matchesEmpty {
			// If this matcher must be non-empty, we can be smarter.
			nm, isNot := m.(*labels.NotMatcher)
			if isNot && matchesEmpty { // l!="foo"
				// If the label can't be empty and is a Not and the inner matcher
				// doesn't match empty, then subtract it out at the end.
				it, err := postingsForMatcher(ix, nm.Matcher)
				if err != nil {
					return nil, err
				}
				notIts = append(notIts, it)
			} else if isNot && !matchesEmpty { // l!=""
				// If the label can't be empty and is a Not, but the inner matcher can
				// be empty we need to use inversePostingsForMatcher.
				it, err := inversePostingsForMatcher(ix, nm.Matcher)
				if err != nil {
					return nil, err
				}
				its = append(its, it)
			} else { // l="a"
				// Non-Not matcher, use normal postingsForMatcher.
				it, err := postingsForMatcher(ix, m)
				if err != nil {
					return nil, err
				}
				its = append(its, it)
			}
		} else { // l=""
			// If the matchers for a labelname selects an empty value, it selects all
			// the series which don't have the label name set too. See:
			// https://github.com/prometheus/prometheus/issues/3575 and
			// https://github.com/prometheus/prometheus/pull/3578#issuecomment-351653555
			it, err := inversePostingsForMatcher(ix, m)
			if err != nil {
				return nil, err
			}
			notIts = append(notIts, it)
		}
	}

	// If there's nothing to subtract from, add in everything and remove the notIts later.
	if len(its) == 0 && len(notIts) != 0 {
		allPostings, err := ix.Postings(index.AllPostingsKey())
		if err != nil {
			return nil, err
		}
		its = append(its, allPostings)
	}

	it := index.Intersect(its...)

	for _, n := range notIts {
		if _, ok := n.(*index.ListPostings); !ok {
			// Best to pre-calculate the merged lists via next rather than have a ton
			// of seeks in Without.
			pl, err := index.ExpandPostings(n)
			if err != nil {
				return nil, err
			}
			n = index.NewListPostings(pl)
		}
		it = index.Without(it, n)
	}

	return ix.SortedPostings(it), nil
}
175274
func (f Filter) NotEndsWith(val interface{}) Filter {
	f.Op = "!$="
	f.Val = val
	return f
}