// SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers
// SPDX-License-Identifier: Apache-2.0

// Code generated with github.com/go-openapi/testify/codegen/v2; DO NOT EDIT.

package assert

import (
	"github.com/go-openapi/testify/v2/internal/assertions"
)

const (
	// ErrTest is an error instance useful for testing.
	//
	// If the code does not care about error specifics, and only needs
	// to return the error as an example, this error may be used to make
	// the test code more readable.
	ErrTest = assertions.ErrTest
)

type (
	// BoolAssertionFunc is a common function prototype when validating a bool value.  Can be useful
	// for table driven tests.
	BoolAssertionFunc = assertions.BoolAssertionFunc

	// Boolean is a bool or any type that can be converted to a bool.
	Boolean = assertions.Boolean

	// CollectT implements the [T] interface and collects all errors.
	//
	// [CollectT] is specifically intended to be used with [EventuallyWith] and
	// should not be used outside of that context.
	CollectT = assertions.CollectT

	// CollectibleConditioner is a function used in asynchronous condition assertions that use [CollectT].
	//
	// This type constraint allows for "overloaded" versions of the condition assertions ([EventuallyWith]).
	//
	// The [WithSynctestCollect] and [WithSynctestCollectContext] wrappers opt a
	// call into fake-time polling. See [WithSynctest] for details.
	CollectibleConditioner = assertions.CollectibleConditioner

	// ComparisonAssertionFunc is a common function prototype when comparing two values.  Can be useful
	// for table driven tests.
	ComparisonAssertionFunc = assertions.ComparisonAssertionFunc

	// Conditioner is a function used in asynchronous condition assertions.
	//
	// This type constraint allows for "overloaded" versions of the condition assertions ([Eventually], [Consistently]).
	//
	// The [WithSynctest] and [WithSynctestContext] wrappers opt a call into
	// fake-time polling via [testing/synctest]. See [WithSynctest] for details.
	Conditioner = assertions.Conditioner

	// ErrorAssertionFunc is a common function prototype when validating an error value.  Can be useful
	// for table driven tests.
	ErrorAssertionFunc = assertions.ErrorAssertionFunc

	// H is an interface for types that implement the Helper method.
	// This allows marking functions as test helpers, e.g. [testing.T.Helper].
	H = assertions.H

	// Measurable is any number for which we can compute a delta (floats or integers).
	//
	// This is used by [InDeltaT] and [InEpsilonT].
	//
	// NOTE: unfortunately complex64 and complex128 are not supported.
	Measurable = assertions.Measurable

	// NeverConditioner is a function used by [Never].
	//
	// Unlike [Conditioner], [Never] does not accept the context-returning-error
	// form to avoid the double-negation confusion ("never returns no error").
	//
	// The [WithSynctest] wrapper opts a call into fake-time polling.
	NeverConditioner = assertions.NeverConditioner

	// Ordered is a standard ordered type (i.e. types that support "<": [cmp.Ordered]) plus []byte and [time.Time].
	//
	// This is used by [GreaterT], [GreaterOrEqualT], [LessT], [LessOrEqualT], [IsIncreasingT], [IsDecreasingT].
	//
	// NOTE: since [time.Time] is a struct, custom types which redeclare [time.Time] are not supported.
	Ordered = assertions.Ordered

	// PanicAssertionFunc is a common function prototype when validating a panic value.  Can be useful
	// for table driven tests.
	PanicAssertionFunc = assertions.PanicAssertionFunc

	// RText extends [Text] by supporting dynamic construction of the
	// expected or actual value, e.g. "redact" functions.
	RText = assertions.RText

	// Redactor allows dynamic construction of expected or actual values, e.g. "redacting" values dynamically.
	//
	// This is used by json and yaml assertions.
	Redactor = assertions.Redactor

	// RegExp is either a text containing a regular expression to compile (string or []byte), or directly the compiled regexp.
	//
	// This is used by [RegexpT] and [NotRegexpT].
	RegExp = assertions.RegExp

	// SignedNumeric is a signed integer or a floating point number or any type that can be converted to one of these.
	SignedNumeric = assertions.SignedNumeric

	// T is an interface wrapper around [testing.T].
	T = assertions.T

	// TestExampleError is a sentinel error type that may be used for testing.
	TestExampleError = assertions.TestExampleError

	// Text is any type of underlying type string or []byte.
	//
	// This is used by [RegexpT], [NotRegexpT], [JSONEqT], and [YAMLEqT].
	//
	// NOTE: unfortunately, []rune is not supported.
	Text = assertions.Text

	// UnsignedNumeric is an unsigned integer.
	//
	// NOTE: there are no unsigned floating point numbers.
	UnsignedNumeric = assertions.UnsignedNumeric

	// ValueAssertionFunc is a common function prototype when validating a single value.  Can be useful
	// for table driven tests.
	ValueAssertionFunc = assertions.ValueAssertionFunc

	// WithSynctest wraps a [func() bool] condition to run [Eventually] /
	// [Never] / [Consistently] polling inside a [testing/synctest] bubble,
	// so `time.Ticker`, `time.After`, and `context.WithTimeout` use a fake
	// clock. Activation requires the caller to pass a real `*testing.T`;
	// with mocks or other [T] implementations, the wrapper falls back to
	// real-time polling.
	//
	// # When to use
	//
	// Use when the condition is pure compute, relies on `time.Sleep`, or
	// coordinates via channels created inside the condition. Fake time
	// eliminates timing-induced flakiness and enables deterministic tick
	// counts.
	//
	// # When not to use
	//
	// Do NOT use when the condition performs real I/O (network, filesystem,
	// syscalls): those block goroutines non-durably, so the fake clock
	// stalls and the timeout may not fire. Also do NOT use inside a test
	// that is already running in a [synctest.Test] bubble — nested bubbles
	// are forbidden and will panic.
	//
	// # Shared state
	//
	// The condition may read and write variables captured from the enclosing
	// scope; condition execution is serialized by design (see [Eventually]'s
	// Concurrency section). Avoid sharing channels or mutexes with goroutines
	// outside the bubble, as this will stall the fake clock.
	WithSynctest = assertions.WithSynctest

	// WithSynctestCollect is the [func(*CollectT)] counterpart of
	// [WithSynctest] for use with [EventuallyWith]. See [WithSynctest] for details.
	WithSynctestCollect = assertions.WithSynctestCollect

	// WithSynctestCollectContext is the [func(context.Context, *CollectT)]
	// counterpart of [WithSynctest] for use with [EventuallyWith]. See
	// [WithSynctest] for details.
	WithSynctestCollectContext = assertions.WithSynctestCollectContext

	// WithSynctestContext is the [func(context.Context) error] counterpart
	// of [WithSynctest]. See [WithSynctest] for details.
	WithSynctestContext = assertions.WithSynctestContext
)

// Type declarations for backward compatibility.
type (
	// TestingT is like [T] and is declared here to remain compatible with previous versions of this package.
	//
	// Most users should not be affected, as the implementation of [T] that is widely used is [testing.T].
	//
	// Deprecated: use [T] as a more concise alternative.
	TestingT = T
)
