From cec6edf37a5f5db09d87f44b778ccba17456c095 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Sun, 23 Aug 2026 17:55:29 +0200 Subject: [PATCH 1/3] feat(codegen): expose generic assertions as methods on go1.27 go1.27 accepts type parameters on methods, so the 55 generic assertions become methods of the Assertions type: a.EqualT(expected, actual) next to assert.EqualT(t, expected, actual). Eventually, Never, Consistently and EventuallyWith gain a method for the first time; being generic without a T suffix, they had none at all. The methods land in assert/assert_forward_go127.go and require/require_forward_go127.go, guarded by //go:build go1.27. A go1.25 or go1.26 build drops those files and keeps the package-level functions. Codegen: - Function.ForwardGoBuild returns max(source guard, go1.27) for a generic function, so ErrorAsType and NotErrorAsType (guarded go1.26) join the go1.27 file and a future go1.28 generic assertion would get its own; - Generate runs a second partition loop over ForwardBuildVariants, and selectVariant takes the partitioning key, SourceGoBuild or ForwardGoBuild; - the forward templates render both partitions from one body, since GenericName and GenericCallName fall back to Name for a plain function. Doc site: - method rows for generic assertions carry a goversion "go1.27" badge; - every assertion now counts 4 variants per package, where generics counted 2: package_variants 446 -> 556, total API surface 902 -> 1122. The go.work toolchain floor moves to go1.27.0. TestToolchainFloorCoversGuards only scans internal/assertions, so it does not enforce this guard: codegen emits it, and the go.work comment records why the floor must cover it. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Frederic BIDON --- assert/assert_adhoc_generic_methods_test.go | 42 + assert/assert_forward.go | 3 +- assert/assert_forward_go127.go | 1115 ++++++ assert/assert_forward_go127_test.go | 3179 +++++++++++++++++ codegen/internal/generator/doc_generator.go | 9 +- .../generator/forward_generics_test.go | 150 + .../internal/generator/funcmaps/funcmaps.go | 4 +- codegen/internal/generator/generator.go | 64 +- .../templates/assertion_forward.gotmpl | 13 +- .../templates/assertion_forward_test.gotmpl | 4 +- .../generator/templates/doc_metrics.md.gotmpl | 4 + .../generator/templates/doc_page.md.gotmpl | 11 +- .../templates/requirement_forward.gotmpl | 33 +- codegen/internal/model/buildtags.go | 125 + codegen/internal/model/buildtags_test.go | 52 + codegen/internal/model/documentation.go | 6 + codegen/internal/model/model.go | 39 +- docs/doc-site/_index.md | 5 +- docs/doc-site/api/boolean.md | 11 + docs/doc-site/api/collection.md | 67 + docs/doc-site/api/comparison.md | 27 + docs/doc-site/api/condition.md | 27 + docs/doc-site/api/equality.md | 19 + docs/doc-site/api/error.md | 11 + docs/doc-site/api/json.md | 15 + docs/doc-site/api/metrics.md | 10 +- docs/doc-site/api/number.md | 15 + docs/doc-site/api/ordering.md | 27 + docs/doc-site/api/string.md | 11 + docs/doc-site/api/type.md | 11 + docs/doc-site/api/yaml.md | 15 + .../project/maintainers/ARCHITECTURE.md | 13 +- go.work | 15 +- hack/doc-site/hugo/metrics.yaml | 6 +- require/require_forward.go | 3 +- require/require_forward_go127.go | 1555 ++++++++ require/require_forward_go127_test.go | 2741 ++++++++++++++ 37 files changed, 9346 insertions(+), 111 deletions(-) create mode 100644 assert/assert_adhoc_generic_methods_test.go create mode 100644 assert/assert_forward_go127.go create mode 100644 assert/assert_forward_go127_test.go create mode 100644 codegen/internal/generator/forward_generics_test.go create mode 100644 codegen/internal/model/buildtags.go create mode 100644 require/require_forward_go127.go create mode 100644 require/require_forward_go127_test.go diff --git a/assert/assert_adhoc_generic_methods_test.go b/assert/assert_adhoc_generic_methods_test.go new file mode 100644 index 000000000..979ceba77 --- /dev/null +++ b/assert/assert_adhoc_generic_methods_test.go @@ -0,0 +1,42 @@ +// SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +//go:build go1.27 + +package assert_test + +import ( + "testing" + + "github.com/go-openapi/testify/v2/assert" +) + +// TestGenericMethods exercises the generic assertions as methods against a real +// [testing.T], the way a user writes them. The generated tests in this package drive +// the same methods through a mock T; this one checks that they hold together outside +// codegen, with the type parameter inferred, spelled out, or bound in a method value. +func TestGenericMethods(t *testing.T) { + t.Parallel() + + a := assert.New(t) + + // inferred from the arguments + a.EqualT("expected", "expected") + a.NotEqualT(1, 2) + a.SliceContainsT([]string{"a", "b"}, "b") + a.MapContainsT(map[string]int{"a": 1}, "a") + a.GreaterT(2, 1) + a.InDeltaT(1.0, 1.000001, 1e-3) + + // spelled out, for a type parameter no argument carries + a.IsOfTypeT[int](42) + a.IsNotOfTypeT[string](42) + + // formatted variant + a.EqualTf(3, 3, "expected %d", 3) + + // a method value, instantiated once and reused + equalInt := a.EqualT[int] + equalInt(1, 1) + equalInt(2, 2) +} diff --git a/assert/assert_forward.go b/assert/assert_forward.go index 45280c844..f132b4c3b 100644 --- a/assert/assert_forward.go +++ b/assert/assert_forward.go @@ -16,7 +16,8 @@ import ( // Assertions exposes all assertion functions as methods. // -// NOTE: assertion methods with parameterized types (generics) are not supported as methods. +// NOTE: generic assertions are exposed as methods only when built with go1.27 or newer, +// the first release that accepts type parameters on methods. // // Upon failure, the test [T] is marked as failed and continues execution. type Assertions struct { diff --git a/assert/assert_forward_go127.go b/assert/assert_forward_go127.go new file mode 100644 index 000000000..cf7e695a4 --- /dev/null +++ b/assert/assert_forward_go127.go @@ -0,0 +1,1115 @@ +// 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. + +//go:build go1.27 + +package assert + +import ( + "iter" + "time" + + "github.com/go-openapi/testify/v2/internal/assertions" +) + +// BlockedT is the same as [BlockedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) BlockedT[E any, CHAN ~chan E](ch CHAN, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.BlockedT[E, CHAN](a.T, ch, msgAndArgs...) +} + +// BlockedTf is the same as [Assertions.BlockedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.BlockedT[E, CHAN](a.T, ch, forwardArgs(msg, args)...) +} + +// Consistently is the same as [Consistently], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.Consistently[C](a.T, condition, timeout, tick, msgAndArgs...) +} + +// Consistentlyf is the same as [Assertions.Consistently], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.Consistently[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) +} + +// ElementsMatchT is the same as [ElementsMatchT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) ElementsMatchT[E comparable](listA []E, listB []E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.ElementsMatchT[E](a.T, listA, listB, msgAndArgs...) +} + +// ElementsMatchTf is the same as [Assertions.ElementsMatchT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.ElementsMatchT[E](a.T, listA, listB, forwardArgs(msg, args)...) +} + +// EqualT is the same as [EqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) EqualT[V comparable](expected V, actual V, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.EqualT[V](a.T, expected, actual, msgAndArgs...) +} + +// EqualTf is the same as [Assertions.EqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) EqualTf[V comparable](expected V, actual V, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.EqualT[V](a.T, expected, actual, forwardArgs(msg, args)...) +} + +// ErrorAsType is the same as [ErrorAsType], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) ErrorAsType[E error](err error, target *E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.ErrorAsType[E](a.T, err, target, msgAndArgs...) +} + +// ErrorAsTypef is the same as [Assertions.ErrorAsType], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) ErrorAsTypef[E error](err error, target *E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.ErrorAsType[E](a.T, err, target, forwardArgs(msg, args)...) +} + +// Eventually is the same as [Eventually], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.Eventually[C](a.T, condition, timeout, tick, msgAndArgs...) +} + +// Eventuallyf is the same as [Assertions.Eventually], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.Eventually[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) +} + +// EventuallyWith is the same as [EventuallyWith], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.EventuallyWith[C](a.T, condition, timeout, tick, msgAndArgs...) +} + +// EventuallyWithf is the same as [Assertions.EventuallyWith], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.EventuallyWith[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) +} + +// FalseT is the same as [FalseT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) FalseT[B Boolean](value B, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.FalseT[B](a.T, value, msgAndArgs...) +} + +// FalseTf is the same as [Assertions.FalseT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) FalseTf[B Boolean](value B, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.FalseT[B](a.T, value, forwardArgs(msg, args)...) +} + +// GreaterOrEqualT is the same as [GreaterOrEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.GreaterOrEqualT[Orderable](a.T, e1, e2, msgAndArgs...) +} + +// GreaterOrEqualTf is the same as [Assertions.GreaterOrEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.GreaterOrEqualT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) +} + +// GreaterT is the same as [GreaterT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.GreaterT[Orderable](a.T, e1, e2, msgAndArgs...) +} + +// GreaterTf is the same as [Assertions.GreaterT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.GreaterT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) +} + +// InDeltaT is the same as [InDeltaT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) InDeltaT[Number Measurable](expected Number, actual Number, delta Number, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.InDeltaT[Number](a.T, expected, actual, delta, msgAndArgs...) +} + +// InDeltaTf is the same as [Assertions.InDeltaT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.InDeltaT[Number](a.T, expected, actual, delta, forwardArgs(msg, args)...) +} + +// InEpsilonSymmetricT is the same as [InEpsilonSymmetricT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.InEpsilonSymmetricT[Number](a.T, x, y, epsilon, msgAndArgs...) +} + +// InEpsilonSymmetricTf is the same as [Assertions.InEpsilonSymmetricT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.InEpsilonSymmetricT[Number](a.T, x, y, epsilon, forwardArgs(msg, args)...) +} + +// InEpsilonT is the same as [InEpsilonT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.InEpsilonT[Number](a.T, expected, actual, epsilon, msgAndArgs...) +} + +// InEpsilonTf is the same as [Assertions.InEpsilonT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.InEpsilonT[Number](a.T, expected, actual, epsilon, forwardArgs(msg, args)...) +} + +// IsDecreasingT is the same as [IsDecreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsDecreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) +} + +// IsDecreasingTf is the same as [Assertions.IsDecreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsDecreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) +} + +// IsIncreasingT is the same as [IsIncreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsIncreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) +} + +// IsIncreasingTf is the same as [Assertions.IsIncreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsIncreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) +} + +// IsNonDecreasingT is the same as [IsNonDecreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsNonDecreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) +} + +// IsNonDecreasingTf is the same as [Assertions.IsNonDecreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsNonDecreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) +} + +// IsNonIncreasingT is the same as [IsNonIncreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsNonIncreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) +} + +// IsNonIncreasingTf is the same as [Assertions.IsNonIncreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsNonIncreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) +} + +// IsNotOfTypeT is the same as [IsNotOfTypeT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsNotOfTypeT[EType any](object any, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsNotOfTypeT[EType](a.T, object, msgAndArgs...) +} + +// IsNotOfTypeTf is the same as [Assertions.IsNotOfTypeT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsNotOfTypeTf[EType any](object any, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsNotOfTypeT[EType](a.T, object, forwardArgs(msg, args)...) +} + +// IsOfTypeT is the same as [IsOfTypeT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsOfTypeT[EType any](object any, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsOfTypeT[EType](a.T, object, msgAndArgs...) +} + +// IsOfTypeTf is the same as [Assertions.IsOfTypeT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) IsOfTypeTf[EType any](object any, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.IsOfTypeT[EType](a.T, object, forwardArgs(msg, args)...) +} + +// JSONEqT is the same as [JSONEqT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.JSONEqT[EDoc, ADoc](a.T, expected, actual, msgAndArgs...) +} + +// JSONEqTf is the same as [Assertions.JSONEqT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.JSONEqT[EDoc, ADoc](a.T, expected, actual, forwardArgs(msg, args)...) +} + +// JSONMarshalAsT is the same as [JSONMarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) JSONMarshalAsT[EDoc RText](expected EDoc, object any, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.JSONMarshalAsT[EDoc](a.T, expected, object, msgAndArgs...) +} + +// JSONMarshalAsTf is the same as [Assertions.JSONMarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.JSONMarshalAsT[EDoc](a.T, expected, object, forwardArgs(msg, args)...) +} + +// JSONUnmarshalAsT is the same as [JSONUnmarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.JSONUnmarshalAsT[Object, ADoc](a.T, expected, jazon, msgAndArgs...) +} + +// JSONUnmarshalAsTf is the same as [Assertions.JSONUnmarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.JSONUnmarshalAsT[Object, ADoc](a.T, expected, jazon, forwardArgs(msg, args)...) +} + +// LessOrEqualT is the same as [LessOrEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.LessOrEqualT[Orderable](a.T, e1, e2, msgAndArgs...) +} + +// LessOrEqualTf is the same as [Assertions.LessOrEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.LessOrEqualT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) +} + +// LessT is the same as [LessT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) LessT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.LessT[Orderable](a.T, e1, e2, msgAndArgs...) +} + +// LessTf is the same as [Assertions.LessT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.LessT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) +} + +// MapContainsT is the same as [MapContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapContainsT[Map, K, V](a.T, m, key, msgAndArgs...) +} + +// MapContainsTf is the same as [Assertions.MapContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapContainsT[Map, K, V](a.T, m, key, forwardArgs(msg, args)...) +} + +// MapEqualT is the same as [MapEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapEqualT[K, V comparable](listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapEqualT[K, V](a.T, listA, listB, msgAndArgs...) +} + +// MapEqualTf is the same as [Assertions.MapEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapEqualT[K, V](a.T, listA, listB, forwardArgs(msg, args)...) +} + +// MapNotContainsT is the same as [MapNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapNotContainsT[Map, K, V](a.T, m, key, msgAndArgs...) +} + +// MapNotContainsTf is the same as [Assertions.MapNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapNotContainsT[Map, K, V](a.T, m, key, forwardArgs(msg, args)...) +} + +// MapNotEqualT is the same as [MapNotEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapNotEqualT[K, V](a.T, listA, listB, msgAndArgs...) +} + +// MapNotEqualTf is the same as [Assertions.MapNotEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.MapNotEqualT[K, V](a.T, listA, listB, forwardArgs(msg, args)...) +} + +// NegativeT is the same as [NegativeT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NegativeT[SignedNumber SignedNumeric](e SignedNumber, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NegativeT[SignedNumber](a.T, e, msgAndArgs...) +} + +// NegativeTf is the same as [Assertions.NegativeT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NegativeT[SignedNumber](a.T, e, forwardArgs(msg, args)...) +} + +// Never is the same as [Never], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.Never[C](a.T, condition, timeout, tick, msgAndArgs...) +} + +// Neverf is the same as [Assertions.Never], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.Never[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) +} + +// NotBlockedT is the same as [NotBlockedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotBlockedT[E any, CHAN ~chan E](ch CHAN, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotBlockedT[E, CHAN](a.T, ch, msgAndArgs...) +} + +// NotBlockedTf is the same as [Assertions.NotBlockedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotBlockedT[E, CHAN](a.T, ch, forwardArgs(msg, args)...) +} + +// NotElementsMatchT is the same as [NotElementsMatchT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotElementsMatchT[E comparable](listA []E, listB []E, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotElementsMatchT[E](a.T, listA, listB, msgAndArgs...) +} + +// NotElementsMatchTf is the same as [Assertions.NotElementsMatchT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotElementsMatchT[E](a.T, listA, listB, forwardArgs(msg, args)...) +} + +// NotEqualT is the same as [NotEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotEqualT[V comparable](expected V, actual V, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotEqualT[V](a.T, expected, actual, msgAndArgs...) +} + +// NotEqualTf is the same as [Assertions.NotEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotEqualTf[V comparable](expected V, actual V, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotEqualT[V](a.T, expected, actual, forwardArgs(msg, args)...) +} + +// NotErrorAsType is the same as [NotErrorAsType], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotErrorAsType[E error](err error, target *E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotErrorAsType[E](a.T, err, target, msgAndArgs...) +} + +// NotErrorAsTypef is the same as [Assertions.NotErrorAsType], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotErrorAsTypef[E error](err error, target *E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotErrorAsType[E](a.T, err, target, forwardArgs(msg, args)...) +} + +// NotRegexpT is the same as [NotRegexpT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotRegexpT[Rex, ADoc](a.T, rx, actual, msgAndArgs...) +} + +// NotRegexpTf is the same as [Assertions.NotRegexpT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotRegexpT[Rex, ADoc](a.T, rx, actual, forwardArgs(msg, args)...) +} + +// NotSameT is the same as [NotSameT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotSameT[P any](expected *P, actual *P, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotSameT[P](a.T, expected, actual, msgAndArgs...) +} + +// NotSameTf is the same as [Assertions.NotSameT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotSameTf[P any](expected *P, actual *P, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotSameT[P](a.T, expected, actual, forwardArgs(msg, args)...) +} + +// NotSortedT is the same as [NotSortedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotSortedT[OrderedSlice, E](a.T, collection, msgAndArgs...) +} + +// NotSortedTf is the same as [Assertions.NotSortedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.NotSortedT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) +} + +// PositiveT is the same as [PositiveT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) PositiveT[SignedNumber SignedNumeric](e SignedNumber, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.PositiveT[SignedNumber](a.T, e, msgAndArgs...) +} + +// PositiveTf is the same as [Assertions.PositiveT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.PositiveT[SignedNumber](a.T, e, forwardArgs(msg, args)...) +} + +// RegexpT is the same as [RegexpT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.RegexpT[Rex, ADoc](a.T, rx, actual, msgAndArgs...) +} + +// RegexpTf is the same as [Assertions.RegexpT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.RegexpT[Rex, ADoc](a.T, rx, actual, forwardArgs(msg, args)...) +} + +// SameT is the same as [SameT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SameT[P any](expected *P, actual *P, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SameT[P](a.T, expected, actual, msgAndArgs...) +} + +// SameTf is the same as [Assertions.SameT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SameTf[P any](expected *P, actual *P, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SameT[P](a.T, expected, actual, forwardArgs(msg, args)...) +} + +// SeqContainsT is the same as [SeqContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SeqContainsT[E comparable](iter iter.Seq[E], element E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SeqContainsT[E](a.T, iter, element, msgAndArgs...) +} + +// SeqContainsTf is the same as [Assertions.SeqContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SeqContainsT[E](a.T, iter, element, forwardArgs(msg, args)...) +} + +// SeqNotContainsT is the same as [SeqNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SeqNotContainsT[E comparable](iter iter.Seq[E], element E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SeqNotContainsT[E](a.T, iter, element, msgAndArgs...) +} + +// SeqNotContainsTf is the same as [Assertions.SeqNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SeqNotContainsT[E](a.T, iter, element, forwardArgs(msg, args)...) +} + +// SliceContainsT is the same as [SliceContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceContainsT[Slice ~[]E, E comparable](s Slice, element E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceContainsT[Slice, E](a.T, s, element, msgAndArgs...) +} + +// SliceContainsTf is the same as [Assertions.SliceContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceContainsT[Slice, E](a.T, s, element, forwardArgs(msg, args)...) +} + +// SliceEqualT is the same as [SliceEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceEqualT[E comparable](listA []E, listB []E, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceEqualT[E](a.T, listA, listB, msgAndArgs...) +} + +// SliceEqualTf is the same as [Assertions.SliceEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceEqualT[E](a.T, listA, listB, forwardArgs(msg, args)...) +} + +// SliceNotContainsT is the same as [SliceNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceNotContainsT[Slice, E](a.T, s, element, msgAndArgs...) +} + +// SliceNotContainsTf is the same as [Assertions.SliceNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceNotContainsT[Slice, E](a.T, s, element, forwardArgs(msg, args)...) +} + +// SliceNotEqualT is the same as [SliceNotEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceNotEqualT[E comparable](listA []E, listB []E, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceNotEqualT[E](a.T, listA, listB, msgAndArgs...) +} + +// SliceNotEqualTf is the same as [Assertions.SliceNotEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceNotEqualT[E](a.T, listA, listB, forwardArgs(msg, args)...) +} + +// SliceNotSubsetT is the same as [SliceNotSubsetT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceNotSubsetT[Slice, E](a.T, list, subset, msgAndArgs...) +} + +// SliceNotSubsetTf is the same as [Assertions.SliceNotSubsetT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceNotSubsetT[Slice, E](a.T, list, subset, forwardArgs(msg, args)...) +} + +// SliceSubsetT is the same as [SliceSubsetT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice, msgAndArgs ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceSubsetT[Slice, E](a.T, list, subset, msgAndArgs...) +} + +// SliceSubsetTf is the same as [Assertions.SliceSubsetT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any) (ok bool) { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SliceSubsetT[Slice, E](a.T, list, subset, forwardArgs(msg, args)...) +} + +// SortedT is the same as [SortedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SortedT[OrderedSlice, E](a.T, collection, msgAndArgs...) +} + +// SortedTf is the same as [Assertions.SortedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.SortedT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) +} + +// StringContainsT is the same as [StringContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.StringContainsT[ADoc, EDoc](a.T, str, substring, msgAndArgs...) +} + +// StringContainsTf is the same as [Assertions.StringContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.StringContainsT[ADoc, EDoc](a.T, str, substring, forwardArgs(msg, args)...) +} + +// StringNotContainsT is the same as [StringNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.StringNotContainsT[ADoc, EDoc](a.T, str, substring, msgAndArgs...) +} + +// StringNotContainsTf is the same as [Assertions.StringNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.StringNotContainsT[ADoc, EDoc](a.T, str, substring, forwardArgs(msg, args)...) +} + +// TrueT is the same as [TrueT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) TrueT[B Boolean](value B, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.TrueT[B](a.T, value, msgAndArgs...) +} + +// TrueTf is the same as [Assertions.TrueT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) TrueTf[B Boolean](value B, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.TrueT[B](a.T, value, forwardArgs(msg, args)...) +} + +// YAMLEqT is the same as [YAMLEqT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.YAMLEqT[EDoc, ADoc](a.T, expected, actual, msgAndArgs...) +} + +// YAMLEqTf is the same as [Assertions.YAMLEqT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.YAMLEqT[EDoc, ADoc](a.T, expected, actual, forwardArgs(msg, args)...) +} + +// YAMLMarshalAsT is the same as [YAMLMarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) YAMLMarshalAsT[EDoc RText](expected EDoc, object any, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.YAMLMarshalAsT[EDoc](a.T, expected, object, msgAndArgs...) +} + +// YAMLMarshalAsTf is the same as [Assertions.YAMLMarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.YAMLMarshalAsT[EDoc](a.T, expected, object, forwardArgs(msg, args)...) +} + +// YAMLUnmarshalAsT is the same as [YAMLUnmarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc, msgAndArgs ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.YAMLUnmarshalAsT[Object, ADoc](a.T, expected, yamlDoc, msgAndArgs...) +} + +// YAMLUnmarshalAsTf is the same as [Assertions.YAMLUnmarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and continues execution. +func (a *Assertions) YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ...any) bool { + if h, ok := a.T.(H); ok { + h.Helper() + } + return assertions.YAMLUnmarshalAsT[Object, ADoc](a.T, expected, yamlDoc, forwardArgs(msg, args)...) +} diff --git a/assert/assert_forward_go127_test.go b/assert/assert_forward_go127_test.go new file mode 100644 index 000000000..ac2a65d38 --- /dev/null +++ b/assert/assert_forward_go127_test.go @@ -0,0 +1,3179 @@ +// 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. + +//go:build go1.27 + +package assert + +import ( + "fmt" + "slices" + "testing" + "time" +) + +func TestAssertionsBlockedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.BlockedT(make(chan struct{})) + if !result { + t.Error("Assertions.BlockedT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.BlockedT(sendChanMessage()) + if result { + t.Error("Assertions.BlockedT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.BlockedT should mark test as failed") + } + }) +} + +func TestAssertionsConsistently(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Consistently(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond) + if !result { + t.Error("Assertions.Consistently should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Consistently(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond) + if result { + t.Error("Assertions.Consistently should return false on failure") + } + if !mock.failed { + t.Error("Assertions.Consistently should mark test as failed") + } + }) +} + +func TestAssertionsElementsMatchT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ElementsMatchT([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}) + if !result { + t.Error("Assertions.ElementsMatchT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ElementsMatchT([]int{1, 2, 3}, []int{1, 2, 4}) + if result { + t.Error("Assertions.ElementsMatchT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.ElementsMatchT should mark test as failed") + } + }) +} + +func TestAssertionsEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EqualT(123, 123) + if !result { + t.Error("Assertions.EqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EqualT(123, 456) + if result { + t.Error("Assertions.EqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.EqualT should mark test as failed") + } + }) +} + +func TestAssertionsErrorAsType(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ErrorAsType(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError)) + if !result { + t.Error("Assertions.ErrorAsType should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ErrorAsType(ErrTest, new(*dummyError)) + if result { + t.Error("Assertions.ErrorAsType should return false on failure") + } + if !mock.failed { + t.Error("Assertions.ErrorAsType should mark test as failed") + } + }) +} + +func TestAssertionsEventually(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Eventually(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond) + if !result { + t.Error("Assertions.Eventually should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Eventually(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond) + if result { + t.Error("Assertions.Eventually should return false on failure") + } + if !mock.failed { + t.Error("Assertions.Eventually should mark test as failed") + } + }) +} + +func TestAssertionsEventuallyWith(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EventuallyWith(func(c *CollectT) { True(c, true) }, 100*time.Millisecond, 20*time.Millisecond) + if !result { + t.Error("Assertions.EventuallyWith should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EventuallyWith(func(c *CollectT) { False(c, true) }, 100*time.Millisecond, 20*time.Millisecond) + if result { + t.Error("Assertions.EventuallyWith should return false on failure") + } + if !mock.failed { + t.Error("Assertions.EventuallyWith should mark test as failed") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EventuallyWith(func(c *CollectT) { c.Cancel() }, 100*time.Millisecond, 20*time.Millisecond) + if result { + t.Error("Assertions.EventuallyWith should return false on failure") + } + if !mock.failed { + t.Error("Assertions.EventuallyWith should mark test as failed") + } + }) +} + +func TestAssertionsFalseT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.FalseT(1 == 0) + if !result { + t.Error("Assertions.FalseT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.FalseT(1 == 1) + if result { + t.Error("Assertions.FalseT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.FalseT should mark test as failed") + } + }) +} + +func TestAssertionsGreaterOrEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterOrEqualT(2, 1) + if !result { + t.Error("Assertions.GreaterOrEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterOrEqualT(1, 2) + if result { + t.Error("Assertions.GreaterOrEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.GreaterOrEqualT should mark test as failed") + } + }) +} + +func TestAssertionsGreaterT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterT(2, 1) + if !result { + t.Error("Assertions.GreaterT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterT(1, 2) + if result { + t.Error("Assertions.GreaterT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.GreaterT should mark test as failed") + } + }) +} + +func TestAssertionsInDeltaT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InDeltaT(1.0, 1.01, 0.02) + if !result { + t.Error("Assertions.InDeltaT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InDeltaT(1.0, 1.1, 0.05) + if result { + t.Error("Assertions.InDeltaT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.InDeltaT should mark test as failed") + } + }) +} + +func TestAssertionsInEpsilonSymmetricT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonSymmetricT(100.0, 101.0, 0.02) + if !result { + t.Error("Assertions.InEpsilonSymmetricT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonSymmetricT(100.0, 110.0, 0.05) + if result { + t.Error("Assertions.InEpsilonSymmetricT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.InEpsilonSymmetricT should mark test as failed") + } + }) +} + +func TestAssertionsInEpsilonT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonT(100.0, 101.0, 0.02) + if !result { + t.Error("Assertions.InEpsilonT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonT(100.0, 110.0, 0.05) + if result { + t.Error("Assertions.InEpsilonT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.InEpsilonT should mark test as failed") + } + }) +} + +func TestAssertionsIsDecreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsDecreasingT([]int{3, 2, 1}) + if !result { + t.Error("Assertions.IsDecreasingT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsDecreasingT([]int{1, 2, 3}) + if result { + t.Error("Assertions.IsDecreasingT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsDecreasingT should mark test as failed") + } + }) +} + +func TestAssertionsIsIncreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsIncreasingT([]int{1, 2, 3}) + if !result { + t.Error("Assertions.IsIncreasingT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsIncreasingT([]int{1, 1, 2}) + if result { + t.Error("Assertions.IsIncreasingT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsIncreasingT should mark test as failed") + } + }) +} + +func TestAssertionsIsNonDecreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonDecreasingT([]int{1, 1, 2}) + if !result { + t.Error("Assertions.IsNonDecreasingT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonDecreasingT([]int{2, 1, 0}) + if result { + t.Error("Assertions.IsNonDecreasingT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsNonDecreasingT should mark test as failed") + } + }) +} + +func TestAssertionsIsNonIncreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonIncreasingT([]int{2, 1, 1}) + if !result { + t.Error("Assertions.IsNonIncreasingT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonIncreasingT([]int{1, 2, 3}) + if result { + t.Error("Assertions.IsNonIncreasingT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsNonIncreasingT should mark test as failed") + } + }) +} + +func TestAssertionsIsNotOfTypeT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNotOfTypeT[myType](123.123) + if !result { + t.Error("Assertions.IsNotOfTypeT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNotOfTypeT[myType](myType(123.123)) + if result { + t.Error("Assertions.IsNotOfTypeT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsNotOfTypeT should mark test as failed") + } + }) +} + +func TestAssertionsIsOfTypeT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsOfTypeT[myType](myType(123.123)) + if !result { + t.Error("Assertions.IsOfTypeT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsOfTypeT[myType](123.123) + if result { + t.Error("Assertions.IsOfTypeT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsOfTypeT should mark test as failed") + } + }) +} + +func TestAssertionsJSONEqT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONEqT(`{"hello": "world", "foo": "bar"}`, []byte(`{"foo": "bar", "hello": "world"}`)) + if !result { + t.Error("Assertions.JSONEqT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONEqT(`{"hello": "world", "foo": "bar"}`, `[{"foo": "bar"}, {"hello": "world"}]`) + if result { + t.Error("Assertions.JSONEqT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.JSONEqT should mark test as failed") + } + }) +} + +func TestAssertionsJSONMarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONMarshalAsT([]byte(`{"A": "a"}`), dummyStruct{A: "a"}) + if !result { + t.Error("Assertions.JSONMarshalAsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONMarshalAsT(`[{"foo": "bar"}, {"hello": "world"}]`, 1) + if result { + t.Error("Assertions.JSONMarshalAsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.JSONMarshalAsT should mark test as failed") + } + }) +} + +func TestAssertionsJSONUnmarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONUnmarshalAsT(dummyStruct{A: "a"}, []byte(`{"A": "a"}`)) + if !result { + t.Error("Assertions.JSONUnmarshalAsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONUnmarshalAsT(1, `[{"foo": "bar"}, {"hello": "world"}]`) + if result { + t.Error("Assertions.JSONUnmarshalAsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.JSONUnmarshalAsT should mark test as failed") + } + }) +} + +func TestAssertionsLessOrEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessOrEqualT(1, 2) + if !result { + t.Error("Assertions.LessOrEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessOrEqualT(2, 1) + if result { + t.Error("Assertions.LessOrEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.LessOrEqualT should mark test as failed") + } + }) +} + +func TestAssertionsLessT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessT(1, 2) + if !result { + t.Error("Assertions.LessT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessT(2, 1) + if result { + t.Error("Assertions.LessT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.LessT should mark test as failed") + } + }) +} + +func TestAssertionsMapContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapContainsT(map[string]string{"A": "B"}, "A") + if !result { + t.Error("Assertions.MapContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapContainsT(map[string]string{"A": "B"}, "C") + if result { + t.Error("Assertions.MapContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapContainsT should mark test as failed") + } + }) +} + +func TestAssertionsMapEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapEqualT(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}) + if !result { + t.Error("Assertions.MapEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapEqualT(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}) + if result { + t.Error("Assertions.MapEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapEqualT should mark test as failed") + } + }) +} + +func TestAssertionsMapNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotContainsT(map[string]string{"A": "B"}, "C") + if !result { + t.Error("Assertions.MapNotContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotContainsT(map[string]string{"A": "B"}, "A") + if result { + t.Error("Assertions.MapNotContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapNotContainsT should mark test as failed") + } + }) +} + +func TestAssertionsMapNotEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotEqualT(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}) + if !result { + t.Error("Assertions.MapNotEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotEqualT(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}) + if result { + t.Error("Assertions.MapNotEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapNotEqualT should mark test as failed") + } + }) +} + +func TestAssertionsNegativeT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NegativeT(-1) + if !result { + t.Error("Assertions.NegativeT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NegativeT(1) + if result { + t.Error("Assertions.NegativeT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NegativeT should mark test as failed") + } + }) +} + +func TestAssertionsNever(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Never(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond) + if !result { + t.Error("Assertions.Never should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Never(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond) + if result { + t.Error("Assertions.Never should return false on failure") + } + if !mock.failed { + t.Error("Assertions.Never should mark test as failed") + } + }) +} + +func TestAssertionsNotBlockedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotBlockedT(sendChanMessage()) + if !result { + t.Error("Assertions.NotBlockedT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotBlockedT(make(chan struct{})) + if result { + t.Error("Assertions.NotBlockedT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotBlockedT should mark test as failed") + } + }) +} + +func TestAssertionsNotElementsMatchT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotElementsMatchT([]int{1, 2, 3}, []int{1, 2, 4}) + if !result { + t.Error("Assertions.NotElementsMatchT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotElementsMatchT([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}) + if result { + t.Error("Assertions.NotElementsMatchT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotElementsMatchT should mark test as failed") + } + }) +} + +func TestAssertionsNotEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotEqualT(123, 456) + if !result { + t.Error("Assertions.NotEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotEqualT(123, 123) + if result { + t.Error("Assertions.NotEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotEqualT should mark test as failed") + } + }) +} + +func TestAssertionsNotErrorAsType(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotErrorAsType(ErrTest, new(*dummyError)) + if !result { + t.Error("Assertions.NotErrorAsType should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotErrorAsType(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError)) + if result { + t.Error("Assertions.NotErrorAsType should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotErrorAsType should mark test as failed") + } + }) +} + +func TestAssertionsNotRegexpT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotRegexpT("^start", "not starting") + if !result { + t.Error("Assertions.NotRegexpT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotRegexpT("^start", "starting") + if result { + t.Error("Assertions.NotRegexpT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotRegexpT should mark test as failed") + } + }) +} + +func TestAssertionsNotSameT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSameT(&staticVar, ptr("static string")) + if !result { + t.Error("Assertions.NotSameT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSameT(&staticVar, staticVarPtr) + if result { + t.Error("Assertions.NotSameT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotSameT should mark test as failed") + } + }) +} + +func TestAssertionsNotSortedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSortedT([]int{3, 1, 3}) + if !result { + t.Error("Assertions.NotSortedT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSortedT([]int{1, 4, 8}) + if result { + t.Error("Assertions.NotSortedT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotSortedT should mark test as failed") + } + }) +} + +func TestAssertionsPositiveT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.PositiveT(1) + if !result { + t.Error("Assertions.PositiveT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.PositiveT(-1) + if result { + t.Error("Assertions.PositiveT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.PositiveT should mark test as failed") + } + }) +} + +func TestAssertionsRegexpT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.RegexpT("^start", "starting") + if !result { + t.Error("Assertions.RegexpT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.RegexpT("^start", "not starting") + if result { + t.Error("Assertions.RegexpT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.RegexpT should mark test as failed") + } + }) +} + +func TestAssertionsSameT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SameT(&staticVar, staticVarPtr) + if !result { + t.Error("Assertions.SameT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SameT(&staticVar, ptr("static string")) + if result { + t.Error("Assertions.SameT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SameT should mark test as failed") + } + }) +} + +func TestAssertionsSeqContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqContainsT(slices.Values([]string{"A", "B"}), "A") + if !result { + t.Error("Assertions.SeqContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqContainsT(slices.Values([]string{"A", "B"}), "C") + if result { + t.Error("Assertions.SeqContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SeqContainsT should mark test as failed") + } + }) +} + +func TestAssertionsSeqNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqNotContainsT(slices.Values([]string{"A", "B"}), "C") + if !result { + t.Error("Assertions.SeqNotContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqNotContainsT(slices.Values([]string{"A", "B"}), "A") + if result { + t.Error("Assertions.SeqNotContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SeqNotContainsT should mark test as failed") + } + }) +} + +func TestAssertionsSliceContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceContainsT([]string{"A", "B"}, "A") + if !result { + t.Error("Assertions.SliceContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceContainsT([]string{"A", "B"}, "C") + if result { + t.Error("Assertions.SliceContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceContainsT should mark test as failed") + } + }) +} + +func TestAssertionsSliceEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceEqualT([]string{"Hello", "World"}, []string{"Hello", "World"}) + if !result { + t.Error("Assertions.SliceEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceEqualT([]string{"Hello", "World"}, []string{"Hello"}) + if result { + t.Error("Assertions.SliceEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceEqualT should mark test as failed") + } + }) +} + +func TestAssertionsSliceNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotContainsT([]string{"A", "B"}, "C") + if !result { + t.Error("Assertions.SliceNotContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotContainsT([]string{"A", "B"}, "A") + if result { + t.Error("Assertions.SliceNotContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceNotContainsT should mark test as failed") + } + }) +} + +func TestAssertionsSliceNotEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotEqualT([]string{"Hello", "World"}, []string{"Hello"}) + if !result { + t.Error("Assertions.SliceNotEqualT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotEqualT([]string{"Hello", "World"}, []string{"Hello", "World"}) + if result { + t.Error("Assertions.SliceNotEqualT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceNotEqualT should mark test as failed") + } + }) +} + +func TestAssertionsSliceNotSubsetT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotSubsetT([]int{1, 2, 3}, []int{4, 5}) + if !result { + t.Error("Assertions.SliceNotSubsetT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotSubsetT([]int{1, 2, 3}, []int{1, 2}) + if result { + t.Error("Assertions.SliceNotSubsetT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceNotSubsetT should mark test as failed") + } + }) +} + +func TestAssertionsSliceSubsetT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceSubsetT([]int{1, 2, 3}, []int{1, 2}) + if !result { + t.Error("Assertions.SliceSubsetT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceSubsetT([]int{1, 2, 3}, []int{4, 5}) + if result { + t.Error("Assertions.SliceSubsetT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceSubsetT should mark test as failed") + } + }) +} + +func TestAssertionsSortedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SortedT([]int{1, 1, 3}) + if !result { + t.Error("Assertions.SortedT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SortedT([]int{1, 4, 2}) + if result { + t.Error("Assertions.SortedT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SortedT should mark test as failed") + } + }) +} + +func TestAssertionsStringContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringContainsT("AB", "A") + if !result { + t.Error("Assertions.StringContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringContainsT("AB", "C") + if result { + t.Error("Assertions.StringContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.StringContainsT should mark test as failed") + } + }) +} + +func TestAssertionsStringNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringNotContainsT("AB", "C") + if !result { + t.Error("Assertions.StringNotContainsT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringNotContainsT("AB", "A") + if result { + t.Error("Assertions.StringNotContainsT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.StringNotContainsT should mark test as failed") + } + }) +} + +func TestAssertionsTrueT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.TrueT(1 == 1) + if !result { + t.Error("Assertions.TrueT should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.TrueT(1 == 0) + if result { + t.Error("Assertions.TrueT should return false on failure") + } + if !mock.failed { + t.Error("Assertions.TrueT should mark test as failed") + } + }) +} + +func TestAssertionsYAMLEqT(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Panics(func() { + a.YAMLEqT("key: value", "key: value") + }, "should panic without the yaml feature enabled.") + if !result { + t.Error("Assertions.YAMLEqT should return true on panic") + } + if mock.failed { + t.Error("Assertions.YAMLEqT should panic as expected") + } + }) +} + +func TestAssertionsYAMLMarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Panics(func() { + a.YAMLMarshalAsT("key: value", "key: value") + }, "should panic without the yaml feature enabled.") + if !result { + t.Error("Assertions.YAMLMarshalAsT should return true on panic") + } + if mock.failed { + t.Error("Assertions.YAMLMarshalAsT should panic as expected") + } + }) +} + +func TestAssertionsYAMLUnmarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Panics(func() { + a.YAMLUnmarshalAsT("key: value", "key: value") + }, "should panic without the yaml feature enabled.") + if !result { + t.Error("Assertions.YAMLUnmarshalAsT should return true on panic") + } + if mock.failed { + t.Error("Assertions.YAMLUnmarshalAsT should panic as expected") + } + }) +} + +func TestAssertionsBlockedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.BlockedTf(make(chan struct{}), "test message") + if !result { + t.Error("Assertions.BlockedTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.BlockedTf(sendChanMessage(), "test message") + if result { + t.Error("Assertions.BlockedTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.BlockedTf should mark test as failed") + } + }) +} + +func TestAssertionsConsistentlyf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Consistentlyf(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if !result { + t.Error("Assertions.Consistentlyf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Consistentlyf(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if result { + t.Error("Assertions.Consistentlyf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.Consistentlyf should mark test as failed") + } + }) +} + +func TestAssertionsElementsMatchTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ElementsMatchTf([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}, "test message") + if !result { + t.Error("Assertions.ElementsMatchTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ElementsMatchTf([]int{1, 2, 3}, []int{1, 2, 4}, "test message") + if result { + t.Error("Assertions.ElementsMatchTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.ElementsMatchTf should mark test as failed") + } + }) +} + +func TestAssertionsEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EqualTf(123, 123, "test message") + if !result { + t.Error("Assertions.EqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EqualTf(123, 456, "test message") + if result { + t.Error("Assertions.EqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.EqualTf should mark test as failed") + } + }) +} + +func TestAssertionsErrorAsTypef(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ErrorAsTypef(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError), "test message") + if !result { + t.Error("Assertions.ErrorAsTypef should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.ErrorAsTypef(ErrTest, new(*dummyError), "test message") + if result { + t.Error("Assertions.ErrorAsTypef should return false on failure") + } + if !mock.failed { + t.Error("Assertions.ErrorAsTypef should mark test as failed") + } + }) +} + +func TestAssertionsEventuallyf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Eventuallyf(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if !result { + t.Error("Assertions.Eventuallyf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Eventuallyf(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if result { + t.Error("Assertions.Eventuallyf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.Eventuallyf should mark test as failed") + } + }) +} + +func TestAssertionsEventuallyWithf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EventuallyWithf(func(c *CollectT) { True(c, true) }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if !result { + t.Error("Assertions.EventuallyWithf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EventuallyWithf(func(c *CollectT) { False(c, true) }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if result { + t.Error("Assertions.EventuallyWithf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.EventuallyWithf should mark test as failed") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.EventuallyWithf(func(c *CollectT) { c.Cancel() }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if result { + t.Error("Assertions.EventuallyWithf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.EventuallyWithf should mark test as failed") + } + }) +} + +func TestAssertionsFalseTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.FalseTf(1 == 0, "test message") + if !result { + t.Error("Assertions.FalseTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.FalseTf(1 == 1, "test message") + if result { + t.Error("Assertions.FalseTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.FalseTf should mark test as failed") + } + }) +} + +func TestAssertionsGreaterOrEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterOrEqualTf(2, 1, "test message") + if !result { + t.Error("Assertions.GreaterOrEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterOrEqualTf(1, 2, "test message") + if result { + t.Error("Assertions.GreaterOrEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.GreaterOrEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsGreaterTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterTf(2, 1, "test message") + if !result { + t.Error("Assertions.GreaterTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.GreaterTf(1, 2, "test message") + if result { + t.Error("Assertions.GreaterTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.GreaterTf should mark test as failed") + } + }) +} + +func TestAssertionsInDeltaTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InDeltaTf(1.0, 1.01, 0.02, "test message") + if !result { + t.Error("Assertions.InDeltaTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InDeltaTf(1.0, 1.1, 0.05, "test message") + if result { + t.Error("Assertions.InDeltaTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.InDeltaTf should mark test as failed") + } + }) +} + +func TestAssertionsInEpsilonSymmetricTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonSymmetricTf(100.0, 101.0, 0.02, "test message") + if !result { + t.Error("Assertions.InEpsilonSymmetricTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonSymmetricTf(100.0, 110.0, 0.05, "test message") + if result { + t.Error("Assertions.InEpsilonSymmetricTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.InEpsilonSymmetricTf should mark test as failed") + } + }) +} + +func TestAssertionsInEpsilonTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonTf(100.0, 101.0, 0.02, "test message") + if !result { + t.Error("Assertions.InEpsilonTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.InEpsilonTf(100.0, 110.0, 0.05, "test message") + if result { + t.Error("Assertions.InEpsilonTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.InEpsilonTf should mark test as failed") + } + }) +} + +func TestAssertionsIsDecreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsDecreasingTf([]int{3, 2, 1}, "test message") + if !result { + t.Error("Assertions.IsDecreasingTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsDecreasingTf([]int{1, 2, 3}, "test message") + if result { + t.Error("Assertions.IsDecreasingTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsDecreasingTf should mark test as failed") + } + }) +} + +func TestAssertionsIsIncreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsIncreasingTf([]int{1, 2, 3}, "test message") + if !result { + t.Error("Assertions.IsIncreasingTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsIncreasingTf([]int{1, 1, 2}, "test message") + if result { + t.Error("Assertions.IsIncreasingTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsIncreasingTf should mark test as failed") + } + }) +} + +func TestAssertionsIsNonDecreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonDecreasingTf([]int{1, 1, 2}, "test message") + if !result { + t.Error("Assertions.IsNonDecreasingTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonDecreasingTf([]int{2, 1, 0}, "test message") + if result { + t.Error("Assertions.IsNonDecreasingTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsNonDecreasingTf should mark test as failed") + } + }) +} + +func TestAssertionsIsNonIncreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonIncreasingTf([]int{2, 1, 1}, "test message") + if !result { + t.Error("Assertions.IsNonIncreasingTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNonIncreasingTf([]int{1, 2, 3}, "test message") + if result { + t.Error("Assertions.IsNonIncreasingTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsNonIncreasingTf should mark test as failed") + } + }) +} + +func TestAssertionsIsNotOfTypeTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNotOfTypeTf[myType](123.123, "test message") + if !result { + t.Error("Assertions.IsNotOfTypeTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsNotOfTypeTf[myType](myType(123.123), "test message") + if result { + t.Error("Assertions.IsNotOfTypeTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsNotOfTypeTf should mark test as failed") + } + }) +} + +func TestAssertionsIsOfTypeTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsOfTypeTf[myType](myType(123.123), "test message") + if !result { + t.Error("Assertions.IsOfTypeTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.IsOfTypeTf[myType](123.123, "test message") + if result { + t.Error("Assertions.IsOfTypeTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.IsOfTypeTf should mark test as failed") + } + }) +} + +func TestAssertionsJSONEqTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONEqTf(`{"hello": "world", "foo": "bar"}`, []byte(`{"foo": "bar", "hello": "world"}`), "test message") + if !result { + t.Error("Assertions.JSONEqTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONEqTf(`{"hello": "world", "foo": "bar"}`, `[{"foo": "bar"}, {"hello": "world"}]`, "test message") + if result { + t.Error("Assertions.JSONEqTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.JSONEqTf should mark test as failed") + } + }) +} + +func TestAssertionsJSONMarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONMarshalAsTf([]byte(`{"A": "a"}`), dummyStruct{A: "a"}, "test message") + if !result { + t.Error("Assertions.JSONMarshalAsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONMarshalAsTf(`[{"foo": "bar"}, {"hello": "world"}]`, 1, "test message") + if result { + t.Error("Assertions.JSONMarshalAsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.JSONMarshalAsTf should mark test as failed") + } + }) +} + +func TestAssertionsJSONUnmarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONUnmarshalAsTf(dummyStruct{A: "a"}, []byte(`{"A": "a"}`), "test message") + if !result { + t.Error("Assertions.JSONUnmarshalAsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.JSONUnmarshalAsTf(1, `[{"foo": "bar"}, {"hello": "world"}]`, "test message") + if result { + t.Error("Assertions.JSONUnmarshalAsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.JSONUnmarshalAsTf should mark test as failed") + } + }) +} + +func TestAssertionsLessOrEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessOrEqualTf(1, 2, "test message") + if !result { + t.Error("Assertions.LessOrEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessOrEqualTf(2, 1, "test message") + if result { + t.Error("Assertions.LessOrEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.LessOrEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsLessTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessTf(1, 2, "test message") + if !result { + t.Error("Assertions.LessTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.LessTf(2, 1, "test message") + if result { + t.Error("Assertions.LessTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.LessTf should mark test as failed") + } + }) +} + +func TestAssertionsMapContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapContainsTf(map[string]string{"A": "B"}, "A", "test message") + if !result { + t.Error("Assertions.MapContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapContainsTf(map[string]string{"A": "B"}, "C", "test message") + if result { + t.Error("Assertions.MapContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsMapEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapEqualTf(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + if !result { + t.Error("Assertions.MapEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapEqualTf(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + if result { + t.Error("Assertions.MapEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsMapNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotContainsTf(map[string]string{"A": "B"}, "C", "test message") + if !result { + t.Error("Assertions.MapNotContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotContainsTf(map[string]string{"A": "B"}, "A", "test message") + if result { + t.Error("Assertions.MapNotContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapNotContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsMapNotEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotEqualTf(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + if !result { + t.Error("Assertions.MapNotEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.MapNotEqualTf(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + if result { + t.Error("Assertions.MapNotEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.MapNotEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsNegativeTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NegativeTf(-1, "test message") + if !result { + t.Error("Assertions.NegativeTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NegativeTf(1, "test message") + if result { + t.Error("Assertions.NegativeTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NegativeTf should mark test as failed") + } + }) +} + +func TestAssertionsNeverf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Neverf(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if !result { + t.Error("Assertions.Neverf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Neverf(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond, "test message") + if result { + t.Error("Assertions.Neverf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.Neverf should mark test as failed") + } + }) +} + +func TestAssertionsNotBlockedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotBlockedTf(sendChanMessage(), "test message") + if !result { + t.Error("Assertions.NotBlockedTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotBlockedTf(make(chan struct{}), "test message") + if result { + t.Error("Assertions.NotBlockedTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotBlockedTf should mark test as failed") + } + }) +} + +func TestAssertionsNotElementsMatchTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotElementsMatchTf([]int{1, 2, 3}, []int{1, 2, 4}, "test message") + if !result { + t.Error("Assertions.NotElementsMatchTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotElementsMatchTf([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}, "test message") + if result { + t.Error("Assertions.NotElementsMatchTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotElementsMatchTf should mark test as failed") + } + }) +} + +func TestAssertionsNotEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotEqualTf(123, 456, "test message") + if !result { + t.Error("Assertions.NotEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotEqualTf(123, 123, "test message") + if result { + t.Error("Assertions.NotEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsNotErrorAsTypef(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotErrorAsTypef(ErrTest, new(*dummyError), "test message") + if !result { + t.Error("Assertions.NotErrorAsTypef should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotErrorAsTypef(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError), "test message") + if result { + t.Error("Assertions.NotErrorAsTypef should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotErrorAsTypef should mark test as failed") + } + }) +} + +func TestAssertionsNotRegexpTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotRegexpTf("^start", "not starting", "test message") + if !result { + t.Error("Assertions.NotRegexpTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotRegexpTf("^start", "starting", "test message") + if result { + t.Error("Assertions.NotRegexpTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotRegexpTf should mark test as failed") + } + }) +} + +func TestAssertionsNotSameTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSameTf(&staticVar, ptr("static string"), "test message") + if !result { + t.Error("Assertions.NotSameTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSameTf(&staticVar, staticVarPtr, "test message") + if result { + t.Error("Assertions.NotSameTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotSameTf should mark test as failed") + } + }) +} + +func TestAssertionsNotSortedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSortedTf([]int{3, 1, 3}, "test message") + if !result { + t.Error("Assertions.NotSortedTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.NotSortedTf([]int{1, 4, 8}, "test message") + if result { + t.Error("Assertions.NotSortedTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.NotSortedTf should mark test as failed") + } + }) +} + +func TestAssertionsPositiveTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.PositiveTf(1, "test message") + if !result { + t.Error("Assertions.PositiveTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.PositiveTf(-1, "test message") + if result { + t.Error("Assertions.PositiveTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.PositiveTf should mark test as failed") + } + }) +} + +func TestAssertionsRegexpTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.RegexpTf("^start", "starting", "test message") + if !result { + t.Error("Assertions.RegexpTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.RegexpTf("^start", "not starting", "test message") + if result { + t.Error("Assertions.RegexpTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.RegexpTf should mark test as failed") + } + }) +} + +func TestAssertionsSameTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SameTf(&staticVar, staticVarPtr, "test message") + if !result { + t.Error("Assertions.SameTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SameTf(&staticVar, ptr("static string"), "test message") + if result { + t.Error("Assertions.SameTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SameTf should mark test as failed") + } + }) +} + +func TestAssertionsSeqContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqContainsTf(slices.Values([]string{"A", "B"}), "A", "test message") + if !result { + t.Error("Assertions.SeqContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqContainsTf(slices.Values([]string{"A", "B"}), "C", "test message") + if result { + t.Error("Assertions.SeqContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SeqContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsSeqNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqNotContainsTf(slices.Values([]string{"A", "B"}), "C", "test message") + if !result { + t.Error("Assertions.SeqNotContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SeqNotContainsTf(slices.Values([]string{"A", "B"}), "A", "test message") + if result { + t.Error("Assertions.SeqNotContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SeqNotContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsSliceContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceContainsTf([]string{"A", "B"}, "A", "test message") + if !result { + t.Error("Assertions.SliceContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceContainsTf([]string{"A", "B"}, "C", "test message") + if result { + t.Error("Assertions.SliceContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsSliceEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceEqualTf([]string{"Hello", "World"}, []string{"Hello", "World"}, "test message") + if !result { + t.Error("Assertions.SliceEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceEqualTf([]string{"Hello", "World"}, []string{"Hello"}, "test message") + if result { + t.Error("Assertions.SliceEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsSliceNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotContainsTf([]string{"A", "B"}, "C", "test message") + if !result { + t.Error("Assertions.SliceNotContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotContainsTf([]string{"A", "B"}, "A", "test message") + if result { + t.Error("Assertions.SliceNotContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceNotContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsSliceNotEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotEqualTf([]string{"Hello", "World"}, []string{"Hello"}, "test message") + if !result { + t.Error("Assertions.SliceNotEqualTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotEqualTf([]string{"Hello", "World"}, []string{"Hello", "World"}, "test message") + if result { + t.Error("Assertions.SliceNotEqualTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceNotEqualTf should mark test as failed") + } + }) +} + +func TestAssertionsSliceNotSubsetTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotSubsetTf([]int{1, 2, 3}, []int{4, 5}, "test message") + if !result { + t.Error("Assertions.SliceNotSubsetTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceNotSubsetTf([]int{1, 2, 3}, []int{1, 2}, "test message") + if result { + t.Error("Assertions.SliceNotSubsetTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceNotSubsetTf should mark test as failed") + } + }) +} + +func TestAssertionsSliceSubsetTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceSubsetTf([]int{1, 2, 3}, []int{1, 2}, "test message") + if !result { + t.Error("Assertions.SliceSubsetTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SliceSubsetTf([]int{1, 2, 3}, []int{4, 5}, "test message") + if result { + t.Error("Assertions.SliceSubsetTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SliceSubsetTf should mark test as failed") + } + }) +} + +func TestAssertionsSortedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SortedTf([]int{1, 1, 3}, "test message") + if !result { + t.Error("Assertions.SortedTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.SortedTf([]int{1, 4, 2}, "test message") + if result { + t.Error("Assertions.SortedTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.SortedTf should mark test as failed") + } + }) +} + +func TestAssertionsStringContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringContainsTf("AB", "A", "test message") + if !result { + t.Error("Assertions.StringContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringContainsTf("AB", "C", "test message") + if result { + t.Error("Assertions.StringContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.StringContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsStringNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringNotContainsTf("AB", "C", "test message") + if !result { + t.Error("Assertions.StringNotContainsTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.StringNotContainsTf("AB", "A", "test message") + if result { + t.Error("Assertions.StringNotContainsTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.StringNotContainsTf should mark test as failed") + } + }) +} + +func TestAssertionsTrueTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.TrueTf(1 == 1, "test message") + if !result { + t.Error("Assertions.TrueTf should return true on success") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.TrueTf(1 == 0, "test message") + if result { + t.Error("Assertions.TrueTf should return false on failure") + } + if !mock.failed { + t.Error("Assertions.TrueTf should mark test as failed") + } + }) +} + +func TestAssertionsYAMLEqTf(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Panics(func() { + a.YAMLEqTf("key: value", "key: value", "test message") + }, "should panic without the yaml feature enabled.") + if !result { + t.Error("Assertions.YAMLEqTf should return true on panic") + } + if mock.failed { + t.Error("Assertions.YAMLEqTf should panic as expected") + } + }) +} + +func TestAssertionsYAMLMarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Panics(func() { + a.YAMLMarshalAsTf("key: value", "key: value", "test message") + }, "should panic without the yaml feature enabled.") + if !result { + t.Error("Assertions.YAMLMarshalAsTf should return true on panic") + } + if mock.failed { + t.Error("Assertions.YAMLMarshalAsTf should panic as expected") + } + }) +} + +func TestAssertionsYAMLUnmarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockT) + a := New(mock) + result := a.Panics(func() { + a.YAMLUnmarshalAsTf("key: value", "key: value", "test message") + }, "should panic without the yaml feature enabled.") + if !result { + t.Error("Assertions.YAMLUnmarshalAsTf should return true on panic") + } + if mock.failed { + t.Error("Assertions.YAMLUnmarshalAsTf should panic as expected") + } + }) +} diff --git a/codegen/internal/generator/doc_generator.go b/codegen/internal/generator/doc_generator.go index c6aef72fe..2f0d7e6de 100644 --- a/codegen/internal/generator/doc_generator.go +++ b/codegen/internal/generator/doc_generator.go @@ -242,8 +242,12 @@ func (d *DocGenerator) buildMetrics(docsByDomain iter.Seq2[string, model.Documen } metrics.NonGenerics = metrics.Assertions - metrics.Generics + + // Since go1.27 a generic assertion produces the same variants as a non-generic one: + // methods take type parameters, so the forward and forward-format variants exist for + // both. The count therefore describes a go1.27 build; on go1.26 the method variants of + // the generic assertions are excluded by their //go:build guard. variantsMultiplier := 1 - genericsVariantsMultiplier := 1 if d.ctx.enableForward { variantsMultiplier++ @@ -254,10 +258,9 @@ func (d *DocGenerator) buildMetrics(docsByDomain iter.Seq2[string, model.Documen if d.ctx.enableFormat { variantsMultiplier++ - genericsVariantsMultiplier++ } - metrics.PackageVariants = metrics.NonGenerics*variantsMultiplier + metrics.Generics*genericsVariantsMultiplier + metrics.PackageVariants = metrics.Assertions * variantsMultiplier // caveat: assume 2 target packages (not really available from options atm). const generatedPackages = 2 diff --git a/codegen/internal/generator/forward_generics_test.go b/codegen/internal/generator/forward_generics_test.go new file mode 100644 index 000000000..88f4f1700 --- /dev/null +++ b/codegen/internal/generator/forward_generics_test.go @@ -0,0 +1,150 @@ +// SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +package generator + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/go-openapi/testify/codegen/v2/internal/model" +) + +// genericSource extends the minimal fixture with a generic assertion, so the forward +// generation has something to place in the go1.27 variant file. +func genericSource(testDataPath string) *model.AssertionPackage { + pkg := minimalSource(testDataPath) + pkg.Functions = append(pkg.Functions, model.Function{ + Name: "EqualT", + SourcePackage: assertions, + TargetPackage: assertions, + DocString: "EqualT asserts that two values of the same type are equal.", + Domain: "equality", + IsGeneric: true, + TypeParams: []model.TypeParam{{Name: "V", Constraint: "comparable"}}, + AllParams: model.Parameters{ + {Name: "t", GoType: "T"}, + {Name: "expected", GoType: "V"}, + {Name: "actual", GoType: "V"}, + {Name: "msgAndArgs", GoType: "any", IsVariadic: true}, + }, + Params: model.Parameters{ + {Name: "expected", GoType: "V"}, + {Name: "actual", GoType: "V"}, + }, + Returns: model.Parameters{ + {GoType: "bool"}, + }, + }) + + return pkg +} + +func generateForward(t *testing.T, targetPkg string, withGenerics bool) string { + t.Helper() + + tmpDir := t.TempDir() + gen := New(genericSource(tmpDir)) + err := gen.Generate( + WithTargetPackage(targetPkg), + WithTargetRoot(tmpDir), + WithIncludeFormatFuncs(true), + WithIncludeForwardFuncs(true), + WithIncludeGenerics(withGenerics), + WithIncludeTests(true), + WithIncludeHelpers(true), + ) + if err != nil { + t.Fatalf("Generate(%s) failed: %v", targetPkg, err) + } + + return filepath.Join(tmpDir, targetPkg) +} + +func readGenerated(t *testing.T, dir, name string) string { + t.Helper() + + data, err := os.ReadFile(filepath.Join(dir, name)) + if err != nil { + t.Fatalf("read %s: %v", name, err) + } + + return string(data) +} + +// TestForwardGenericsAssert checks that a generic assertion becomes a method in the +// go1.27 variant file, and stays out of the unguarded forward file. +func TestForwardGenericsAssert(t *testing.T) { + t.Parallel() + + dir := generateForward(t, pkgAssert, true) + + guarded := readGenerated(t, dir, "assert_forward_go127.go") + for _, want := range []string{ + "//go:build go1.27", + "func (a *Assertions) EqualT[V comparable](expected V, actual V, msgAndArgs ...any) bool {", + "return assertions.EqualT[V](a.T, expected, actual, msgAndArgs...)", + "func (a *Assertions) EqualTf[V comparable](expected V, actual V, msg string, args ...any) bool {", + } { + if !strings.Contains(guarded, want) { + t.Errorf("assert_forward_go127.go does not contain %q", want) + } + } + + // The receiver type and its constructor are declared once, in the unguarded file. + if strings.Contains(guarded, "type Assertions struct") { + t.Error("assert_forward_go127.go redeclares the Assertions type") + } + + plain := readGenerated(t, dir, "assert_forward.go") + if strings.Contains(plain, "EqualT") { + t.Error("assert_forward.go carries the generic method, which does not compile before go1.27") + } + if !strings.Contains(plain, "type Assertions struct") { + t.Error("assert_forward.go should declare the Assertions type") + } + + tests := readGenerated(t, dir, "assert_forward_go127_test.go") + if !strings.Contains(tests, "//go:build go1.27") { + t.Error("assert_forward_go127_test.go misses the //go:build guard") + } + if !strings.Contains(tests, "func TestAssertionsEqualT(t *testing.T) {") { + t.Error("assert_forward_go127_test.go misses the generic method test") + } +} + +// TestForwardGenericsRequire checks the require variant, which fails the test rather +// than returning a value. +func TestForwardGenericsRequire(t *testing.T) { + t.Parallel() + + dir := generateForward(t, pkgRequire, true) + + guarded := readGenerated(t, dir, "require_forward_go127.go") + for _, want := range []string{ + "//go:build go1.27", + "func (a *Assertions) EqualT[V comparable](expected V, actual V, msgAndArgs ...any) {", + "if assertions.EqualT[V](a.T, expected, actual, msgAndArgs...) {", + "a.T.FailNow()", + } { + if !strings.Contains(guarded, want) { + t.Errorf("require_forward_go127.go does not contain %q", want) + } + } +} + +// TestForwardGenericsDisabled checks that -include-generics=false leaves no guarded +// forward file behind at all. +func TestForwardGenericsDisabled(t *testing.T) { + t.Parallel() + + dir := generateForward(t, pkgAssert, false) + + for _, name := range []string{"assert_forward_go127.go", "assert_forward_go127_test.go"} { + if _, err := os.Stat(filepath.Join(dir, name)); !os.IsNotExist(err) { + t.Errorf("%s should not be generated when generics are disabled (err: %v)", name, err) + } + } +} diff --git a/codegen/internal/generator/funcmaps/funcmaps.go b/codegen/internal/generator/funcmaps/funcmaps.go index 2a446eae6..52480286e 100644 --- a/codegen/internal/generator/funcmaps/funcmaps.go +++ b/codegen/internal/generator/funcmaps/funcmaps.go @@ -423,13 +423,13 @@ func testSetup(fn model.Function, variant string, receiver string) model.Functio fn.TestMockFailure = fn.FailMsg("f") fn.TestMsg = "test message" case "forward": - fn.TestCall = "a." + fn.Name + "(" + fn.TestCall = "a." + fn.Name + fn.GenericSuffix() + "(" fn.TestMock = fmt.Sprintf("mock := new(%s)\na := New(mock)", fn.UseMock) fn.TestErrorPrefix = receiver + "." + fn.Name fn.TestPanicWrapper = "a.Panics(" fn.TestMockFailure = fn.FailMsg(receiver, "") case "forward-format": - fn.TestCall = "a." + fn.Name + "f(" + fn.TestCall = "a." + fn.Name + "f" + fn.GenericSuffix() + "(" fn.TestMock = fmt.Sprintf("mock := new(%s)\na := New(mock)", fn.UseMock) fn.TestErrorPrefix = receiver + "." + fn.Name + "f" fn.TestPanicWrapper = "a.Panics(" diff --git a/codegen/internal/generator/generator.go b/codegen/internal/generator/generator.go index 7f45a6208..6645ff34d 100644 --- a/codegen/internal/generator/generator.go +++ b/codegen/internal/generator/generator.go @@ -100,17 +100,26 @@ func (g *Generator) Generate(opts ...GenerateOption) error { // (e.g. a go1.26 variant with no helpers) are skipped by render(). full := g.ctx.target for _, constraint := range full.Functions.BuildVariants() { - g.ctx.target = variantTarget(full, constraint) - g.ctx.variantSuffix = model.GoBuildTag(constraint) - if g.ctx.variantSuffix != "" { - g.ctx.variantSuffix = "_" + g.ctx.variantSuffix - } + g.selectVariant(full, constraint, model.Function.SourceGoBuild) if err := g.generateVariant(); err != nil { return err } } + + // Forward methods partition on their own constraint. A generic assertion becomes a + // method only from go1.27 onwards, whatever guard its source file carries, so the + // forward file it lands in is keyed on ForwardGoBuild, not GoBuild. + for _, constraint := range full.Functions.ForwardBuildVariants() { + g.selectVariant(full, constraint, model.Function.ForwardGoBuild) + + if err := g.generateForwardVariant(); err != nil { + return err + } + } + g.ctx.target = full // restore the full model for Documentation() + g.ctx.variantSuffix = "" // Remove generated build-variant files left over from a variant that no longer exists // (e.g. the last go1.26-guarded assertion was deleted). Without this, those files would @@ -193,8 +202,9 @@ func isGeneratedFile(path string) (bool, error) { return bytes.Contains(data, []byte("DO NOT EDIT.")), nil } -// generateVariant renders every per-function artifact (functions, format, forward, -// helpers and their tests + examples) for the currently selected build-variant. +// generateVariant renders every per-function artifact (functions, format, helpers and +// their tests + examples) for the currently selected build-variant. Forward methods are +// rendered apart, by [Generator.generateForwardVariant]. func (g *Generator) generateVariant() error { { // auto-generated assertions @@ -209,12 +219,6 @@ func (g *Generator) generateVariant() error { return err } - if err := g.generateForwardFuncs(); err != nil { - // assertion_forward.gotmpl - // requirement_forward.gotmpl - return err - } - if err := g.generateHelpers(); err != nil { return err } @@ -231,10 +235,6 @@ func (g *Generator) generateVariant() error { return err } - if err := g.generateForwardTests(); err != nil { - return err - } - if err := g.generateExampleTests(); err != nil { return err } @@ -247,15 +247,41 @@ func (g *Generator) generateVariant() error { return nil } +// generateForwardVariant renders the forward methods (and their tests) for the currently +// selected forward build-variant. +func (g *Generator) generateForwardVariant() error { + if err := g.generateForwardFuncs(); err != nil { + // assertion_forward.gotmpl + // requirement_forward.gotmpl + return err + } + + return g.generateForwardTests() +} + +// selectVariant points the generation context at the subset of functions belonging to the +// given build constraint, and sets the filename suffix the rendered files carry. +// +// constraintOf picks which constraint a function is partitioned on: [model.Function.SourceGoBuild] +// for the files mirroring the source guards, [model.Function.ForwardGoBuild] for the forward +// files, where the generic assertions carry the go1.27 guard of generic methods. +func (g *Generator) selectVariant(full *model.AssertionPackage, constraint string, constraintOf func(model.Function) string) { + g.ctx.target = variantTarget(full, constraint, constraintOf) + g.ctx.variantSuffix = model.GoBuildTag(constraint) + if g.ctx.variantSuffix != "" { + g.ctx.variantSuffix = "_" + g.ctx.variantSuffix + } +} + // variantTarget clones the transformed model, keeping only the functions belonging to the // given build constraint, and stamps the constraint so templates emit the //go:build line. -func variantTarget(base *model.AssertionPackage, constraint string) *model.AssertionPackage { +func variantTarget(base *model.AssertionPackage, constraint string, constraintOf func(model.Function) string) *model.AssertionPackage { tgt := base.Clone() tgt.BuildConstraint = constraint filtered := tgt.Functions[:0:0] for _, fn := range base.Functions { - if fn.GoBuild == constraint { + if constraintOf(fn) == constraint { filtered = append(filtered, fn) } } diff --git a/codegen/internal/generator/templates/assertion_forward.gotmpl b/codegen/internal/generator/templates/assertion_forward.gotmpl index 53ad8d51a..6e558a34e 100644 --- a/codegen/internal/generator/templates/assertion_forward.gotmpl +++ b/codegen/internal/generator/templates/assertion_forward.gotmpl @@ -12,7 +12,8 @@ import ( // {{ .Receiver }} exposes all assertion functions as methods. // -// NOTE: assertion methods with parameterized types (generics) are not supported as methods. +// NOTE: generic assertions are exposed as methods only when built with go1.27 or newer, +// the first release that accepts type parameters on methods. // {{ docStringPackage .Package }} type {{ .Receiver }} struct { @@ -27,23 +28,23 @@ func New(t T) *{{ .Receiver }} { } {{- end }} -{{- range .Functions.Scope "exclude-generics" . }}{{/* generics can't be added to the receiver */}} +{{- range .Functions.Scope "include-generics" . }}{{/* generic methods land in the go1.27 variant file */}} {{ docStringFor "forward" .Name }} // {{ docStringPackage $.Package }} -func (a *{{ $.Receiver }}) {{.Name}}({{ params .Params }}, msgAndArgs ...any) {{ returns .Returns }} { +func (a *{{ $.Receiver }}) {{ .GenericName }}({{ params .Params }}, msgAndArgs ...any) {{ returns .Returns }} { if h, ok := a.T.(H); ok { h.Helper() } - return {{ .TargetPackage }}.{{.Name}}(a.T, {{ forward .Params }}, msgAndArgs...) + return {{ .TargetPackage }}.{{ .GenericCallName }}(a.T, {{ forward .Params }}, msgAndArgs...) } {{- if $.EnableFormat }} {{ docStringFor "format" (concat $.Receiver "." .Name ) }} // {{ docStringPackage $.Package }} -func (a *{{ $.Receiver }}){{ .Name }}f({{ params .Params }}, msg string, args ...any) {{ returns .Returns }} { +func (a *{{ $.Receiver }}) {{ .GenericName "f" }}({{ params .Params }}, msg string, args ...any) {{ returns .Returns }} { if h, ok := a.T.(H); ok { h.Helper() } - return {{ .TargetPackage }}.{{ .Name }}(a.T, {{ forward .Params }}, forwardArgs(msg, args)...) + return {{ .TargetPackage }}.{{ .GenericCallName }}(a.T, {{ forward .Params }}, forwardArgs(msg, args)...) } {{- end }} {{- end }} diff --git a/codegen/internal/generator/templates/assertion_forward_test.gotmpl b/codegen/internal/generator/templates/assertion_forward_test.gotmpl index 16d60f391..7a3e55169 100644 --- a/codegen/internal/generator/templates/assertion_forward_test.gotmpl +++ b/codegen/internal/generator/templates/assertion_forward_test.gotmpl @@ -10,14 +10,14 @@ import ( ) {{- end }} -{{- range .Functions.Scope "exclude-generics" . }} +{{- range .Functions.Scope "include-generics" . }} func Test{{ $.Receiver }}{{ .Name }}(t *testing.T) { {{- template "test-case" (testSetup . "forward" $.Receiver) }} } {{- end }} {{- if $.EnableFormat }} - {{- range .Functions.Scope "exclude-generics" . }} + {{- range .Functions.Scope "include-generics" . }} func Test{{ $.Receiver }}{{ .Name }}f(t *testing.T) { {{- template "test-case" (testSetup . "forward-format" $.Receiver) }} diff --git a/codegen/internal/generator/templates/doc_metrics.md.gotmpl b/codegen/internal/generator/templates/doc_metrics.md.gotmpl index 86c56c8dd..8af896c15 100644 --- a/codegen/internal/generator/templates/doc_metrics.md.gotmpl +++ b/codegen/internal/generator/templates/doc_metrics.md.gotmpl @@ -15,6 +15,10 @@ All assertions are classified into **{{ .Domains }}** domains to help navigate t Counts for core functionality, and generated variants (formatted, forward, forward-formatted). +Counted for a go1.27 build. Generic assertions gain their forward and forward-formatted variants +(the methods of the `Assertions` type) from go1.27 on, the first release that accepts type parameters +on methods; on go1.26 those two variants per generic assertion are excluded by their `//go:build` guard. + | Kind | Count | Note | | ------------------------- | ----------------- | ---- | | All core functions | {{ .Functions }} | Maintained core | diff --git a/codegen/internal/generator/templates/doc_page.md.gotmpl b/codegen/internal/generator/templates/doc_page.md.gotmpl index de8cad815..f6c01f815 100644 --- a/codegen/internal/generator/templates/doc_page.md.gotmpl +++ b/codegen/internal/generator/templates/doc_page.md.gotmpl @@ -49,11 +49,11 @@ {{- if .EnableFormat }} | [`{{ .Package }}.{{ .GenericName "f" }}(t T, {{ params .Params }}, msg string, args ...any) {{ returns .Returns }}`]({{ $godoc }}/{{ .Package }}#{{ .Name }}f) | formatted variant | {{- end }} - {{- if and .EnableForward (not .IsGeneric) }} -| [`{{ .Package}}.(*{{ .Receiver }}).{{ .Name }}({{ params .Params }}) {{ returns .Returns }}`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}) | method variant | + {{- if .EnableForward }} +| [`{{ .Package}}.(*{{ .Receiver }}).{{ .GenericName }}({{ params .Params }}) {{ returns .Returns }}`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}) | method variant{{ if .IsGeneric }} {{ hopen }}% goversion "{{ .ForwardGoBuild }}" %{{ hclose }}{{ end }} | {{- end }} - {{- if and .EnableForward .EnableFormat (not .IsGeneric) }} -| [`{{ .Package }}.(*{{ .Receiver }}).{{ .Name }}f({{ params .Params }}, msg string, args ..any)`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}f) | method formatted variant | + {{- if and .EnableForward .EnableFormat }} +| [`{{ .Package }}.(*{{ .Receiver }}).{{ .GenericName "f" }}({{ params .Params }}, msg string, args ..any)`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}f) | method formatted variant{{ if .IsGeneric }} {{ hopen }}% goversion "{{ .ForwardGoBuild }}" %{{ hclose }}{{ end }} | {{- end }} {{ hopen }}% /tab %{{ hclose }} {{- end }} @@ -106,6 +106,9 @@ _All links point to <{{ .PkgGoDevURL }}>_ This domain exposes {{ .RefCount }} functionalities. {{- if .HasGenerics }} Generic assertions are marked with a {{ hopen }}% icon icon="star" color=orange %{{ hclose }}. +Their method variants carry a {{ hopen }}% goversion "{{ .GenericMethodsGoBuild }}" %{{ hclose }} badge: methods take type +parameters only from {{ .GenericMethodsGoBuild }} onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. {{- end }} {{- if .HasGoGuards }} Assertions requiring a newer Go toolchain are marked with a version badge, e.g. {{ hopen }}% goversion "go1.26" %{{ hclose }} (the assertion is unavailable on older toolchains). diff --git a/codegen/internal/generator/templates/requirement_forward.gotmpl b/codegen/internal/generator/templates/requirement_forward.gotmpl index 55ccd7fd1..654a441a3 100644 --- a/codegen/internal/generator/templates/requirement_forward.gotmpl +++ b/codegen/internal/generator/templates/requirement_forward.gotmpl @@ -12,7 +12,8 @@ import ( // {{ .Receiver }} exposes all assertion functions as methods. // -// NOTE: assertion methods with parameterized types (generics) are not supported as methods. +// NOTE: generic assertions are exposed as methods only when built with go1.27 or newer, +// the first release that accepts type parameters on methods. // {{ docStringPackage .Package }} type {{ .Receiver }} struct { @@ -27,43 +28,41 @@ func New(t T) *{{ .Receiver }} { } {{- end }} -{{- range .Functions }} - {{- if and (not .IsGeneric) (not .IsHelper) (not .IsConstructor) }}{{/* generics can't be added to the receiver */}} +{{- range .Functions.Scope "include-generics" . }}{{/* generic methods land in the go1.27 variant file */}} {{ docStringFor "forward" .Name }} // {{ docStringPackage $.Package }} -func (a *{{ $.Receiver }}) {{.Name}}({{ params .Params }}, msgAndArgs ...any) { +func (a *{{ $.Receiver }}) {{ .GenericName }}({{ params .Params }}, msgAndArgs ...any) { if h, ok := a.T.(H); ok { h.Helper() } - {{- if or (eq .Name "Fail") (eq .Name "FailNow") }}{{/* special sema.Tics for these two, which can only fail */}} - _ = {{ .TargetPackage }}.{{.Name}}(a.T, {{ forward .Params }}, msgAndArgs...) - {{- else }} - if {{ .TargetPackage }}.{{.Name}}(a.T, {{ forward .Params }}, msgAndArgs...) { + {{- if or (eq .Name "Fail") (eq .Name "FailNow") }}{{/* special sema.Tics for these two, which can only fail */}} + _ = {{ .TargetPackage }}.{{ .GenericCallName }}(a.T, {{ forward .Params }}, msgAndArgs...) + {{- else }} + if {{ .TargetPackage }}.{{ .GenericCallName }}(a.T, {{ forward .Params }}, msgAndArgs...) { return } - {{- end }} + {{- end }} a.T.FailNow() } - {{- if $.EnableFormat }} + {{- if $.EnableFormat }} {{ docStringFor "format" (concat $.Receiver "." .Name) }} // {{ docStringPackage $.Package }} -func (a *{{ $.Receiver }}){{ .Name }}f({{ params .Params }}, msg string, args ...any) { +func (a *{{ $.Receiver }}) {{ .GenericName "f" }}({{ params .Params }}, msg string, args ...any) { if h, ok := a.T.(H); ok { h.Helper() } - {{- if or (eq .Name "Fail") (eq .Name "FailNow") }}{{/* special sema.Tics for these two, which can only fail */}} - _ = {{ .TargetPackage }}.{{ .Name }}(a.T, {{ forward .Params }}, forwardArgs(msg, args)...) - {{- else }} - if {{ .TargetPackage }}.{{ .Name }}(a.T, {{ forward .Params }}, forwardArgs(msg, args)...) { + {{- if or (eq .Name "Fail") (eq .Name "FailNow") }}{{/* special sema.Tics for these two, which can only fail */}} + _ = {{ .TargetPackage }}.{{ .GenericCallName }}(a.T, {{ forward .Params }}, forwardArgs(msg, args)...) + {{- else }} + if {{ .TargetPackage }}.{{ .GenericCallName }}(a.T, {{ forward .Params }}, forwardArgs(msg, args)...) { return } - {{- end }} + {{- end }} a.T.FailNow() } - {{- end }} {{- end }} {{- end }} diff --git a/codegen/internal/model/buildtags.go b/codegen/internal/model/buildtags.go new file mode 100644 index 000000000..7c848020e --- /dev/null +++ b/codegen/internal/model/buildtags.go @@ -0,0 +1,125 @@ +// SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers +// SPDX-License-Identifier: Apache-2.0 + +package model + +import ( + "slices" + "strconv" + "strings" +) + +// GenericMethodsGoBuild is the //go:build constraint under which generic assertions may be +// exposed as methods of the Assertions receiver. go1.27 is the first release that accepts +// type parameters on methods. +const GenericMethodsGoBuild = "go1.27" + +// GoBuildTag converts a //go:build version expression into a filename-safe suffix tag, +// e.g. "go1.26" -> "go126". Returns "" for an empty constraint (the default partition). +// +// Only simple single-term go-version constraints are supported for now; dots and spaces +// are stripped to keep the suffix free of any implicit GOOS/GOARCH filename semantics. +func GoBuildTag(expr string) string { + if expr == "" { + return "" + } + + r := strings.NewReplacer(".", "", " ", "") + + return r.Replace(expr) +} + +// goBuildMinor extracts N from a "go1.N" constraint. It returns 0 for an empty constraint +// and for anything that isn't a plain go-version term. +func goBuildMinor(expr string) int { + rest, ok := strings.CutPrefix(expr, "go1.") + if !ok { + return 0 + } + + minor, err := strconv.Atoi(rest) + if err != nil { + return 0 + } + + return minor +} + +// maxGoBuild returns the stricter of two go-version constraints, i.e. the one a file must +// carry to satisfy both. "" (no constraint) is weaker than any go1.N. +func maxGoBuild(a, b string) string { + if goBuildMinor(a) >= goBuildMinor(b) { + return a + } + + return b +} + +// BuildVariants returns the distinct //go:build constraints across the functions, +// in deterministic order, always starting with the default (empty) partition. +func (f Functions) BuildVariants() []string { + seen := map[string]struct{}{"": {}} + variants := []string{""} // default partition is always present + + for _, fn := range f { + if fn.GoBuild == "" { + continue + } + if _, ok := seen[fn.GoBuild]; ok { + continue + } + seen[fn.GoBuild] = struct{}{} + variants = append(variants, fn.GoBuild) + } + + slices.Sort(variants[1:]) // keep "" first, sort the rest for stable output + + return variants +} + +// SourceGoBuild returns the //go:build constraint of the source file this function was +// declared in. It exists as a method so it can be passed around as a partitioning key +// alongside [Function.ForwardGoBuild]. +func (f Function) SourceGoBuild() string { + return f.GoBuild +} + +// ForwardGoBuild returns the //go:build constraint the forward method of this function must +// carry. A generic assertion becomes a method only from [GenericMethodsGoBuild] onwards, so +// its method is guarded by whichever of the two constraints is stricter: the guard of the +// source file it was declared in, or the generic-methods floor. +func (f Function) ForwardGoBuild() string { + if !f.IsGeneric { + return f.GoBuild + } + + return maxGoBuild(f.GoBuild, GenericMethodsGoBuild) +} + +// ForwardBuildVariants returns the distinct //go:build constraints across the forward +// methods, in deterministic order, always starting with the default (empty) partition. +// +// It is the counterpart of [Functions.BuildVariants] for the forward files, which partition +// on [Function.ForwardGoBuild] instead of [Function.GoBuild]: the generic assertions carry a +// go1.27 guard as methods even though their source files are unguarded. +func (f Functions) ForwardBuildVariants() []string { + seen := map[string]struct{}{"": {}} + variants := []string{""} // default partition is always present + + for _, fn := range f { + if fn.IsHelper || fn.IsConstructor { + continue + } + + constraint := fn.ForwardGoBuild() + if _, ok := seen[constraint]; ok { + continue + } + seen[constraint] = struct{}{} + variants = append(variants, constraint) + } + + slices.Sort(variants[1:]) // keep "" first, sort the rest for stable output + + return variants +} diff --git a/codegen/internal/model/buildtags_test.go b/codegen/internal/model/buildtags_test.go index 7ac5cc6df..5a5a44920 100644 --- a/codegen/internal/model/buildtags_test.go +++ b/codegen/internal/model/buildtags_test.go @@ -38,3 +38,55 @@ func TestBuildVariants(t *testing.T) { t.Errorf("BuildVariants() = %v, want %v", got, want) } } + +func TestForwardGoBuild(t *testing.T) { + cases := []struct { + name string + fn Function + want string + }{ + {"plain function", Function{Name: "Equal"}, ""}, + {"guarded function", Function{Name: "ErrorAs", GoBuild: "go1.26"}, "go1.26"}, + {"generic function", Function{Name: "EqualT", IsGeneric: true}, GenericMethodsGoBuild}, + {"generic below the floor", Function{Name: "ErrorAsType", IsGeneric: true, GoBuild: "go1.26"}, GenericMethodsGoBuild}, + {"generic above the floor", Function{Name: "FutureT", IsGeneric: true, GoBuild: "go1.28"}, "go1.28"}, + } + + for _, c := range cases { + if got := c.fn.ForwardGoBuild(); got != c.want { + t.Errorf("%s: ForwardGoBuild() = %q, want %q", c.name, got, c.want) + } + } +} + +func TestForwardBuildVariants(t *testing.T) { + fns := Functions{ + {Name: "Equal"}, + {Name: "ErrorAs", GoBuild: "go1.26"}, + {Name: "EqualT", IsGeneric: true}, + {Name: "ErrorAsType", IsGeneric: true, GoBuild: "go1.26"}, + {Name: "FutureT", IsGeneric: true, GoBuild: "go1.28"}, + {Name: "CallerInfo", IsHelper: true, IsGeneric: true}, + {Name: "New", IsConstructor: true}, + } + + got := fns.ForwardBuildVariants() + want := []string{"", "go1.26", "go1.27", "go1.28"} // default first, rest sorted + + if !slices.Equal(got, want) { + t.Errorf("ForwardBuildVariants() = %v, want %v", got, want) + } +} + +func TestSourceGoBuild(t *testing.T) { + // generic or not, the source guard is what the source file carries + fn := Function{Name: "EqualT", IsGeneric: true} + if got := fn.SourceGoBuild(); got != "" { + t.Errorf("SourceGoBuild() = %q, want %q", got, "") + } + + fn = Function{Name: "ErrorAsType", IsGeneric: true, GoBuild: "go1.26"} + if got := fn.SourceGoBuild(); got != "go1.26" { + t.Errorf("SourceGoBuild() = %q, want %q", got, "go1.26") + } +} diff --git a/codegen/internal/model/documentation.go b/codegen/internal/model/documentation.go index 590d4e0c7..cfbe6ccb9 100644 --- a/codegen/internal/model/documentation.go +++ b/codegen/internal/model/documentation.go @@ -119,6 +119,12 @@ func (d Document) HasGoGuards() bool { return false } +// GenericMethodsGoBuild returns the //go:build constraint under which generic assertions +// are exposed as methods, so doc templates can name the version instead of hard-coding it. +func (d Document) GenericMethodsGoBuild() string { + return GenericMethodsGoBuild +} + type ExtraPackages []*AssertionPackage func (pkgs ExtraPackages) LookupFunction(name string) []FunctionWithContext { diff --git a/codegen/internal/model/model.go b/codegen/internal/model/model.go index c202283a6..53e3e3dbd 100644 --- a/codegen/internal/model/model.go +++ b/codegen/internal/model/model.go @@ -131,43 +131,6 @@ const ( ScopeKindHelpers ScopeKind = "only-helpers" ) -// GoBuildTag converts a //go:build version expression into a filename-safe suffix tag, -// e.g. "go1.26" -> "go126". Returns "" for an empty constraint (the default partition). -// -// Only simple single-term go-version constraints are supported for now; dots and spaces -// are stripped to keep the suffix free of any implicit GOOS/GOARCH filename semantics. -func GoBuildTag(expr string) string { - if expr == "" { - return "" - } - - r := strings.NewReplacer(".", "", " ", "") - - return r.Replace(expr) -} - -// BuildVariants returns the distinct //go:build constraints across the functions, -// in deterministic order, always starting with the default (empty) partition. -func (f Functions) BuildVariants() []string { - seen := map[string]struct{}{"": {}} - variants := []string{""} // default partition is always present - - for _, fn := range f { - if fn.GoBuild == "" { - continue - } - if _, ok := seen[fn.GoBuild]; ok { - continue - } - seen[fn.GoBuild] = struct{}{} - variants = append(variants, fn.GoBuild) - } - - slices.Sort(variants[1:]) // keep "" first, sort the rest for stable output - - return variants -} - type Functions []Function func (f Functions) Scope(scope ScopeKind, ctx *AssertionPackage) (iter.Seq[Function], error) { @@ -182,7 +145,7 @@ func (f Functions) Scope(scope ScopeKind, ctx *AssertionPackage) (iter.Seq[Funct case ScopeKindHelpers: return f.iterScopeHelpers, nil default: - return nil, fmt.Errorf("invalid scope kind in template. Expected one of include-generics, only-helpers, but got %q", scope) + return nil, fmt.Errorf("invalid scope kind in template. Expected one of include-generics, exclude-generics, only-helpers, but got %q", scope) } } diff --git a/docs/doc-site/_index.md b/docs/doc-site/_index.md index a2cb6c11e..abe456d00 100644 --- a/docs/doc-site/_index.md +++ b/docs/doc-site/_index.md @@ -86,7 +86,10 @@ import ( Assertion functions that support go generic types are suffixed with `T` (for "Type safety"). A formatted variant suffixed with `Tf` is also exposed. -Obviously, the `Assertion` type cannot be extended with generic methods, as of `go1.25`. +Build with go1.27 or newer and every generic assertion is also a method of the `Assertions` type: +`a.EqualT(expected, result)` alongside `require.EqualT(t, expected, result)`. go1.27 is the first +release that accepts type parameters on methods; on go1.25 and go1.26 those methods are excluded by +a `//go:build go1.27` guard, and the package-level functions below are the only form available. {{< cards >}} {{% card title="EqualT" %}} diff --git a/docs/doc-site/api/boolean.md b/docs/doc-site/api/boolean.md index 2164030ff..bc8648369 100644 --- a/docs/doc-site/api/boolean.md +++ b/docs/doc-site/api/boolean.md @@ -26,6 +26,9 @@ _All links point to _ This domain exposes 4 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [False](#false) | angles-right @@ -239,12 +242,16 @@ func main() { |--|--| | [`assert.FalseT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FalseT) | package-level function | | [`assert.FalseTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FalseTf) | formatted variant | +| [`assert.(*Assertions).FalseT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FalseT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).FalseTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FalseTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.FalseT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FalseT) | package-level function | | [`require.FalseTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FalseTf) | formatted variant | +| [`require.(*Assertions).FalseT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FalseT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).FalseTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FalseTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -461,12 +468,16 @@ func main() { |--|--| | [`assert.TrueT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#TrueT) | package-level function | | [`assert.TrueTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#TrueTf) | formatted variant | +| [`assert.(*Assertions).TrueT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.TrueT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).TrueTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.TrueTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.TrueT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#TrueT) | package-level function | | [`require.TrueTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#TrueTf) | formatted variant | +| [`require.(*Assertions).TrueT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.TrueT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).TrueTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.TrueTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/collection.md b/docs/doc-site/api/collection.md index 7004c2931..62c4d6fee 100644 --- a/docs/doc-site/api/collection.md +++ b/docs/doc-site/api/collection.md @@ -64,6 +64,9 @@ _All links point to _ This domain exposes 23 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [Contains](#contains) | angles-right @@ -410,12 +413,16 @@ func main() { |--|--| | [`assert.ElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ElementsMatchT) | package-level function | | [`assert.ElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ElementsMatchTf) | formatted variant | +| [`assert.(*Assertions).ElementsMatchT[E comparable](listA []E, listB []E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.ElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchT) | package-level function | | [`require.ElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchTf) | formatted variant | +| [`require.(*Assertions).ElementsMatchT[E comparable](listA []E, listB []E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -641,12 +648,16 @@ func main() { |--|--| | [`assert.MapContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapContainsT) | package-level function | | [`assert.MapContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapContainsTf) | formatted variant | +| [`assert.(*Assertions).MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.MapContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapContainsT) | package-level function | | [`require.MapContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapContainsTf) | formatted variant | +| [`require.(*Assertions).MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -753,12 +764,16 @@ func main() { |--|--| | [`assert.MapEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapEqualT) | package-level function | | [`assert.MapEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapEqualTf) | formatted variant | +| [`assert.(*Assertions).MapEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.MapEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapEqualT) | package-level function | | [`require.MapEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapEqualTf) | formatted variant | +| [`require.(*Assertions).MapEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -860,12 +875,16 @@ func main() { |--|--| | [`assert.MapNotContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotContainsT) | package-level function | | [`assert.MapNotContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotContainsTf) | formatted variant | +| [`assert.(*Assertions).MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.MapNotContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotContainsT) | package-level function | | [`require.MapNotContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotContainsTf) | formatted variant | +| [`require.(*Assertions).MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -971,12 +990,16 @@ func main() { |--|--| | [`assert.MapNotEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotEqualT) | package-level function | | [`assert.MapNotEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotEqualTf) | formatted variant | +| [`assert.(*Assertions).MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.MapNotEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotEqualT) | package-level function | | [`require.MapNotEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotEqualTf) | formatted variant | +| [`require.(*Assertions).MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1313,12 +1336,16 @@ func main() { |--|--| | [`assert.NotElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotElementsMatchT) | package-level function | | [`assert.NotElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotElementsMatchTf) | formatted variant | +| [`assert.(*Assertions).NotElementsMatchT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchT) | package-level function | | [`require.NotElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchTf) | formatted variant | +| [`require.(*Assertions).NotElementsMatchT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1543,12 +1570,16 @@ func main() { |--|--| | [`assert.SeqContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqContainsT) | package-level function | | [`assert.SeqContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqContainsTf) | formatted variant | +| [`assert.(*Assertions).SeqContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SeqContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqContainsT) | package-level function | | [`require.SeqContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqContainsTf) | formatted variant | +| [`require.(*Assertions).SeqContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1654,12 +1685,16 @@ func main() { |--|--| | [`assert.SeqNotContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqNotContainsT) | package-level function | | [`assert.SeqNotContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqNotContainsTf) | formatted variant | +| [`assert.(*Assertions).SeqNotContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SeqNotContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqNotContainsT) | package-level function | | [`require.SeqNotContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqNotContainsTf) | formatted variant | +| [`require.(*Assertions).SeqNotContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1763,12 +1798,16 @@ func main() { |--|--| | [`assert.SliceContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceContainsT) | package-level function | | [`assert.SliceContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceContainsTf) | formatted variant | +| [`assert.(*Assertions).SliceContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SliceContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceContainsT) | package-level function | | [`require.SliceContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceContainsTf) | formatted variant | +| [`require.(*Assertions).SliceContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1875,12 +1914,16 @@ func main() { |--|--| | [`assert.SliceEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceEqualT) | package-level function | | [`assert.SliceEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceEqualTf) | formatted variant | +| [`assert.(*Assertions).SliceEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SliceEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceEqualT) | package-level function | | [`require.SliceEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceEqualTf) | formatted variant | +| [`require.(*Assertions).SliceEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1984,12 +2027,16 @@ func main() { |--|--| | [`assert.SliceNotContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotContainsT) | package-level function | | [`assert.SliceNotContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotContainsTf) | formatted variant | +| [`assert.(*Assertions).SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SliceNotContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotContainsT) | package-level function | | [`require.SliceNotContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotContainsTf) | formatted variant | +| [`require.(*Assertions).SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2095,12 +2142,16 @@ func main() { |--|--| | [`assert.SliceNotEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotEqualT) | package-level function | | [`assert.SliceNotEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotEqualTf) | formatted variant | +| [`assert.(*Assertions).SliceNotEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SliceNotEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotEqualT) | package-level function | | [`require.SliceNotEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotEqualTf) | formatted variant | +| [`require.(*Assertions).SliceNotEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2202,12 +2253,16 @@ func main() { |--|--| | [`assert.SliceNotSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotSubsetT) | package-level function | | [`assert.SliceNotSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotSubsetTf) | formatted variant | +| [`assert.(*Assertions).SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotSubsetT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SliceNotSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotSubsetT) | package-level function | | [`require.SliceNotSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotSubsetTf) | formatted variant | +| [`require.(*Assertions).SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotSubsetT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2309,12 +2364,16 @@ func main() { |--|--| | [`assert.SliceSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceSubsetT) | package-level function | | [`assert.SliceSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceSubsetTf) | formatted variant | +| [`assert.(*Assertions).SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceSubsetT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SliceSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceSubsetT) | package-level function | | [`require.SliceSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceSubsetTf) | formatted variant | +| [`require.(*Assertions).SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceSubsetT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2418,12 +2477,16 @@ func main() { |--|--| | [`assert.StringContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringContainsT) | package-level function | | [`assert.StringContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringContainsTf) | formatted variant | +| [`assert.(*Assertions).StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.StringContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringContainsT) | package-level function | | [`require.StringContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringContainsTf) | formatted variant | +| [`require.(*Assertions).StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2527,12 +2590,16 @@ func main() { |--|--| | [`assert.StringNotContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringNotContainsT) | package-level function | | [`assert.StringNotContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringNotContainsTf) | formatted variant | +| [`assert.(*Assertions).StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.StringNotContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringNotContainsT) | package-level function | | [`require.StringNotContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringNotContainsTf) | formatted variant | +| [`require.(*Assertions).StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/comparison.md b/docs/doc-site/api/comparison.md index 034bc49a2..15657014f 100644 --- a/docs/doc-site/api/comparison.md +++ b/docs/doc-site/api/comparison.md @@ -42,6 +42,9 @@ _All links point to _ This domain exposes 12 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [Greater](#greater) | angles-right @@ -394,12 +397,16 @@ func main() { |--|--| | [`assert.GreaterOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterOrEqualT) | package-level function | | [`assert.GreaterOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterOrEqualTf) | formatted variant | +| [`assert.(*Assertions).GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.GreaterOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualT) | package-level function | | [`require.GreaterOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualTf) | formatted variant | +| [`require.(*Assertions).GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -514,12 +521,16 @@ func main() { |--|--| | [`assert.GreaterT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterT) | package-level function | | [`assert.GreaterTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterTf) | formatted variant | +| [`assert.(*Assertions).GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.GreaterT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterT) | package-level function | | [`require.GreaterTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterTf) | formatted variant | +| [`require.(*Assertions).GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -864,12 +875,16 @@ func main() { |--|--| | [`assert.LessOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessOrEqualT) | package-level function | | [`assert.LessOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessOrEqualTf) | formatted variant | +| [`assert.(*Assertions).LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.LessOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualT) | package-level function | | [`require.LessOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualTf) | formatted variant | +| [`require.(*Assertions).LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -983,12 +998,16 @@ func main() { |--|--| | [`assert.LessT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessT) | package-level function | | [`assert.LessTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessTf) | formatted variant | +| [`assert.(*Assertions).LessT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.LessT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessT) | package-level function | | [`require.LessTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessTf) | formatted variant | +| [`require.(*Assertions).LessT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1203,12 +1222,16 @@ func main() { |--|--| | [`assert.NegativeT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NegativeT) | package-level function | | [`assert.NegativeTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NegativeTf) | formatted variant | +| [`assert.(*Assertions).NegativeT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NegativeT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NegativeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NegativeT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NegativeT) | package-level function | | [`require.NegativeTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NegativeTf) | formatted variant | +| [`require.(*Assertions).NegativeT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NegativeT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NegativeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1423,12 +1446,16 @@ func main() { |--|--| | [`assert.PositiveT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PositiveT) | package-level function | | [`assert.PositiveTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PositiveTf) | formatted variant | +| [`assert.(*Assertions).PositiveT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PositiveT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PositiveTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.PositiveT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PositiveT) | package-level function | | [`require.PositiveTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PositiveTf) | formatted variant | +| [`require.(*Assertions).PositiveT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PositiveT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PositiveTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/condition.md b/docs/doc-site/api/condition.md index b01feadcb..0a7dd912a 100644 --- a/docs/doc-site/api/condition.md +++ b/docs/doc-site/api/condition.md @@ -36,6 +36,9 @@ _All links point to _ This domain exposes 9 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [Blocked](#blocked) | angles-right @@ -254,12 +257,16 @@ func main() { |--|--| | [`assert.BlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#BlockedT) | package-level function | | [`assert.BlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#BlockedTf) | formatted variant | +| [`assert.(*Assertions).BlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.BlockedT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.BlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.BlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#BlockedT) | package-level function | | [`require.BlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#BlockedTf) | formatted variant | +| [`require.(*Assertions).BlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.BlockedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.BlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -752,12 +759,16 @@ func main() { |--|--| | [`assert.Consistently[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Consistently) | package-level function | | [`assert.Consistentlyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Consistentlyf) | formatted variant | +| [`assert.(*Assertions).Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Consistently) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Consistentlyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.Consistently[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Consistently) | package-level function | | [`require.Consistentlyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Consistentlyf) | formatted variant | +| [`require.(*Assertions).Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Consistently) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Consistentlyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1274,12 +1285,16 @@ func main() { |--|--| | [`assert.Eventually[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Eventually) | package-level function | | [`assert.Eventuallyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Eventuallyf) | formatted variant | +| [`assert.(*Assertions).Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Eventually) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Eventuallyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.Eventually[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Eventually) | package-level function | | [`require.Eventuallyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Eventuallyf) | formatted variant | +| [`require.(*Assertions).Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Eventually) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Eventuallyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1521,12 +1536,16 @@ func main() { |--|--| | [`assert.EventuallyWith[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EventuallyWith) | package-level function | | [`assert.EventuallyWithf[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EventuallyWithf) | formatted variant | +| [`assert.(*Assertions).EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EventuallyWith) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EventuallyWithf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.EventuallyWith[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EventuallyWith) | package-level function | | [`require.EventuallyWithf[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EventuallyWithf) | formatted variant | +| [`require.(*Assertions).EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EventuallyWith) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EventuallyWithf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1821,12 +1840,16 @@ func main() { |--|--| | [`assert.Never[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Never) | package-level function | | [`assert.Neverf[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Neverf) | formatted variant | +| [`assert.(*Assertions).Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Never) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Neverf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.Never[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Never) | package-level function | | [`require.Neverf[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Neverf) | formatted variant | +| [`require.(*Assertions).Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Never) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Neverf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2079,12 +2102,16 @@ func sendChanMessage() chan struct{} { |--|--| | [`assert.NotBlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotBlockedT) | package-level function | | [`assert.NotBlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotBlockedTf) | formatted variant | +| [`assert.(*Assertions).NotBlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotBlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedT) | package-level function | | [`require.NotBlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedTf) | formatted variant | +| [`require.(*Assertions).NotBlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/equality.md b/docs/doc-site/api/equality.md index 2c8f35a1a..00a1e25ee 100644 --- a/docs/doc-site/api/equality.md +++ b/docs/doc-site/api/equality.md @@ -50,6 +50,9 @@ _All links point to _ This domain exposes 16 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [Empty](#empty) | angles-right @@ -535,12 +538,16 @@ func main() { |--|--| | [`assert.EqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualT) | package-level function | | [`assert.EqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualTf) | formatted variant | +| [`assert.(*Assertions).EqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).EqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.EqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualT) | package-level function | | [`require.EqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualTf) | formatted variant | +| [`require.(*Assertions).EqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).EqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1207,12 +1214,16 @@ func main() { |--|--| | [`assert.NotEqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualT) | package-level function | | [`assert.NotEqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualTf) | formatted variant | +| [`assert.(*Assertions).NotEqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotEqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotEqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualT) | package-level function | | [`require.NotEqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualTf) | formatted variant | +| [`require.(*Assertions).NotEqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotEqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1689,12 +1700,16 @@ func ptr[T any](value T) *T { |--|--| | [`assert.NotSameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSameT) | package-level function | | [`assert.NotSameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSameTf) | formatted variant | +| [`assert.(*Assertions).NotSameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSameT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotSameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotSameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSameT) | package-level function | | [`require.NotSameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSameTf) | formatted variant | +| [`require.(*Assertions).NotSameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSameT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotSameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1939,12 +1954,16 @@ var ( |--|--| | [`assert.SameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SameT) | package-level function | | [`assert.SameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SameTf) | formatted variant | +| [`assert.(*Assertions).SameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SameT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SameT) | package-level function | | [`require.SameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SameTf) | formatted variant | +| [`require.(*Assertions).SameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SameT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/error.md b/docs/doc-site/api/error.md index eae95beb3..dadad8e74 100644 --- a/docs/doc-site/api/error.md +++ b/docs/doc-site/api/error.md @@ -38,6 +38,9 @@ _All links point to _ This domain exposes 10 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. Assertions requiring a newer Go toolchain are marked with a version badge, e.g. {{% goversion "go1.26" %}} (the assertion is unavailable on older toolchains). ```tree @@ -483,12 +486,16 @@ fmt.Println("passed") |--|--| | [`assert.ErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorAsType) | package-level function | | [`assert.ErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorAsTypef) | formatted variant | +| [`assert.(*Assertions).ErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsType) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).ErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.ErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsType) | package-level function | | [`require.ErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsTypef) | formatted variant | +| [`require.(*Assertions).ErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsType) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).ErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1042,12 +1049,16 @@ fmt.Println("passed") |--|--| | [`assert.NotErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorAsType) | package-level function | | [`assert.NotErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorAsTypef) | formatted variant | +| [`assert.(*Assertions).NotErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsType) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsType) | package-level function | | [`require.NotErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsTypef) | formatted variant | +| [`require.(*Assertions).NotErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsType) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/json.md b/docs/doc-site/api/json.md index 9e953da7a..895b80454 100644 --- a/docs/doc-site/api/json.md +++ b/docs/doc-site/api/json.md @@ -28,6 +28,9 @@ _All links point to _ This domain exposes 5 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [JSONEq](#jsoneq) | angles-right @@ -369,12 +372,16 @@ func main() { |--|--| | [`assert.JSONEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqT) | package-level function | | [`assert.JSONEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqTf) | formatted variant | +| [`assert.(*Assertions).JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.JSONEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqT) | package-level function | | [`require.JSONEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqTf) | formatted variant | +| [`require.(*Assertions).JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -498,12 +505,16 @@ type dummyStruct struct { |--|--| | [`assert.JSONMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONMarshalAsT) | package-level function | | [`assert.JSONMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONMarshalAsTf) | formatted variant | +| [`assert.(*Assertions).JSONMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONMarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.JSONMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONMarshalAsT) | package-level function | | [`require.JSONMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONMarshalAsTf) | formatted variant | +| [`require.(*Assertions).JSONMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONMarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -629,12 +640,16 @@ type dummyStruct struct { |--|--| | [`assert.JSONUnmarshalAsT[Object any, ADoc RText](t T, expected Object, jazon ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONUnmarshalAsT) | package-level function | | [`assert.JSONUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, jazon ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONUnmarshalAsTf) | formatted variant | +| [`assert.(*Assertions).JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.JSONUnmarshalAsT[Object any, ADoc RText](t T, expected Object, jazon ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONUnmarshalAsT) | package-level function | | [`require.JSONUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, jazon ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONUnmarshalAsTf) | formatted variant | +| [`require.(*Assertions).JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/metrics.md b/docs/doc-site/api/metrics.md index 8eca277d7..698533c67 100644 --- a/docs/doc-site/api/metrics.md +++ b/docs/doc-site/api/metrics.md @@ -13,6 +13,10 @@ All assertions are classified into **19** domains to help navigate the API, depe Counts for core functionality, and generated variants (formatted, forward, forward-formatted). +Counted for a go1.27 build. Generic assertions gain their forward and forward-formatted variants +(the methods of the `Assertions` type) from go1.27 on, the first release that accepts type parameters +on methods; on go1.26 those two variants per generic assertion are excluded by their `//go:build` guard. + | Kind | Count | Note | | ------------------------- | ----------------- | ---- | | All core functions | 143 | Maintained core | @@ -20,9 +24,9 @@ Counts for core functionality, and generated variants (formatted, forward, forwa | Generic assertions | 55 | Type-safe assertions ("T" suffix) | | Helpers (not assertions) | 4 | General-purpose utilities, not assertions | | Others | 0 | | -| assert/require variants | 446 | Generated variants | -| Total assertions variants | 892 | Available assertions API | -| Total API surface | 902 | | +| assert/require variants | 556 | Generated variants | +| Total assertions variants | 1112 | Available assertions API | +| Total API surface | 1122 | | ## Quick index diff --git a/docs/doc-site/api/number.md b/docs/doc-site/api/number.md index 623a2f1b2..d761e99e7 100644 --- a/docs/doc-site/api/number.md +++ b/docs/doc-site/api/number.md @@ -36,6 +36,9 @@ _All links point to _ This domain exposes 9 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [InDelta](#indelta) | angles-right @@ -502,12 +505,16 @@ func main() { |--|--| | [`assert.InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Number, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaT) | package-level function | | [`assert.InDeltaTf[Number Measurable](t T, expected Number, actual Number, delta Number, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaTf) | formatted variant | +| [`assert.(*Assertions).InDeltaT[Number Measurable](expected Number, actual Number, delta Number) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Number, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaT) | package-level function | | [`require.InDeltaTf[Number Measurable](t T, expected Number, actual Number, delta Number, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaTf) | formatted variant | +| [`require.(*Assertions).InDeltaT[Number Measurable](expected Number, actual Number, delta Number) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -980,12 +987,16 @@ func main() { |--|--| | [`assert.InEpsilonSymmetricT[Number Measurable](t T, x Number, y Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSymmetricT) | package-level function | | [`assert.InEpsilonSymmetricTf[Number Measurable](t T, x Number, y Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSymmetricTf) | formatted variant | +| [`assert.(*Assertions).InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.InEpsilonSymmetricT[Number Measurable](t T, x Number, y Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricT) | package-level function | | [`require.InEpsilonSymmetricTf[Number Measurable](t T, x Number, y Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricTf) | formatted variant | +| [`require.(*Assertions).InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1108,12 +1119,16 @@ func main() { |--|--| | [`assert.InEpsilonT[Number Measurable](t T, expected Number, actual Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonT) | package-level function | | [`assert.InEpsilonTf[Number Measurable](t T, expected Number, actual Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonTf) | formatted variant | +| [`assert.(*Assertions).InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.InEpsilonT[Number Measurable](t T, expected Number, actual Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonT) | package-level function | | [`require.InEpsilonTf[Number Measurable](t T, expected Number, actual Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonTf) | formatted variant | +| [`require.(*Assertions).InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/ordering.md b/docs/doc-site/api/ordering.md index 0fedc3fd8..cd27f4dca 100644 --- a/docs/doc-site/api/ordering.md +++ b/docs/doc-site/api/ordering.md @@ -38,6 +38,9 @@ _All links point to _ This domain exposes 10 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [IsDecreasing](#isdecreasing) | angles-right @@ -257,12 +260,16 @@ func main() { |--|--| | [`assert.IsDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsDecreasingT) | package-level function | | [`assert.IsDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsDecreasingTf) | formatted variant | +| [`assert.(*Assertions).IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.IsDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingT) | package-level function | | [`require.IsDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingTf) | formatted variant | +| [`require.(*Assertions).IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -479,12 +486,16 @@ func main() { |--|--| | [`assert.IsIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsIncreasingT) | package-level function | | [`assert.IsIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsIncreasingTf) | formatted variant | +| [`assert.(*Assertions).IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.IsIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingT) | package-level function | | [`require.IsIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingTf) | formatted variant | +| [`require.(*Assertions).IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -713,12 +724,16 @@ func main() { |--|--| | [`assert.IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonDecreasingT) | package-level function | | [`assert.IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonDecreasingTf) | formatted variant | +| [`assert.(*Assertions).IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingT) | package-level function | | [`require.IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingTf) | formatted variant | +| [`require.(*Assertions).IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -947,12 +962,16 @@ func main() { |--|--| | [`assert.IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonIncreasingT) | package-level function | | [`assert.IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonIncreasingTf) | formatted variant | +| [`assert.(*Assertions).IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingT) | package-level function | | [`require.IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingTf) | formatted variant | +| [`require.(*Assertions).IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1058,12 +1077,16 @@ func main() { |--|--| | [`assert.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSortedT) | package-level function | | [`assert.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSortedTf) | formatted variant | +| [`assert.(*Assertions).NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSortedT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSortedT) | package-level function | | [`require.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSortedTf) | formatted variant | +| [`require.(*Assertions).NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSortedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1169,12 +1192,16 @@ func main() { |--|--| | [`assert.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SortedT) | package-level function | | [`assert.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SortedTf) | formatted variant | +| [`assert.(*Assertions).SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SortedT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SortedT) | package-level function | | [`require.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SortedTf) | formatted variant | +| [`require.(*Assertions).SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SortedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/string.md b/docs/doc-site/api/string.md index b6c63e351..ac434236a 100644 --- a/docs/doc-site/api/string.md +++ b/docs/doc-site/api/string.md @@ -26,6 +26,9 @@ _All links point to _ This domain exposes 4 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [NotRegexp](#notregexp) | angles-right @@ -241,12 +244,16 @@ func main() { |--|--| | [`assert.NotRegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotRegexpT) | package-level function | | [`assert.NotRegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotRegexpTf) | formatted variant | +| [`assert.(*Assertions).NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.NotRegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpT) | package-level function | | [`require.NotRegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpTf) | formatted variant | +| [`require.(*Assertions).NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -463,12 +470,16 @@ func main() { |--|--| | [`assert.RegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#RegexpT) | package-level function | | [`assert.RegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#RegexpTf) | formatted variant | +| [`assert.(*Assertions).RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.RegexpT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.RegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.RegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#RegexpT) | package-level function | | [`require.RegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#RegexpTf) | formatted variant | +| [`require.(*Assertions).RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.RegexpT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.RegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/type.md b/docs/doc-site/api/type.md index 0bfb2a7d2..6d0d1c0b3 100644 --- a/docs/doc-site/api/type.md +++ b/docs/doc-site/api/type.md @@ -38,6 +38,9 @@ _All links point to _ This domain exposes 10 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [Implements](#implements) | angles-right @@ -283,12 +286,16 @@ type myType float64 |--|--| | [`assert.IsNotOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNotOfTypeT) | package-level function | | [`assert.IsNotOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNotOfTypeTf) | formatted variant | +| [`assert.(*Assertions).IsNotOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotOfTypeT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsNotOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.IsNotOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotOfTypeT) | package-level function | | [`require.IsNotOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotOfTypeTf) | formatted variant | +| [`require.(*Assertions).IsNotOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotOfTypeT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsNotOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -505,12 +512,16 @@ type myType float64 |--|--| | [`assert.IsOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsOfTypeT) | package-level function | | [`assert.IsOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsOfTypeTf) | formatted variant | +| [`assert.(*Assertions).IsOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsOfTypeT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.IsOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsOfTypeT) | package-level function | | [`require.IsOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsOfTypeTf) | formatted variant | +| [`require.(*Assertions).IsOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsOfTypeT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/yaml.md b/docs/doc-site/api/yaml.md index cf44620ca..946d161c4 100644 --- a/docs/doc-site/api/yaml.md +++ b/docs/doc-site/api/yaml.md @@ -28,6 +28,9 @@ _All links point to _ This domain exposes 5 functionalities. Generic assertions are marked with a {{% icon icon="star" color=orange %}}. +Their method variants carry a {{% goversion "go1.27" %}} badge: methods take type +parameters only from go1.27 onwards, so on an older toolchain a generic assertion is available as a +package-level function alone. ```tree - [YAMLEq](#yamleq) | angles-right @@ -179,12 +182,16 @@ NOTE: passed values (expected, actual) may be wrapped as functions to redact the |--|--| | [`assert.YAMLEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqT) | package-level function | | [`assert.YAMLEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqTf) | formatted variant | +| [`assert.(*Assertions).YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.YAMLEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqT) | package-level function | | [`require.YAMLEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqTf) | formatted variant | +| [`require.(*Assertions).YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -234,12 +241,16 @@ NOTE: passed expected value may be wrapped as a function to redact the input tex |--|--| | [`assert.YAMLMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLMarshalAsT) | package-level function | | [`assert.YAMLMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLMarshalAsTf) | formatted variant | +| [`assert.(*Assertions).YAMLMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLMarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.YAMLMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLMarshalAsT) | package-level function | | [`require.YAMLMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLMarshalAsTf) | formatted variant | +| [`require.(*Assertions).YAMLMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLMarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -291,12 +302,16 @@ NOTE: passed yamlDoc value may be wrapped as a function to redact the input text |--|--| | [`assert.YAMLUnmarshalAsT[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLUnmarshalAsT) | package-level function | | [`assert.YAMLUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLUnmarshalAsTf) | formatted variant | +| [`assert.(*Assertions).YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.YAMLUnmarshalAsT[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLUnmarshalAsT) | package-level function | | [`require.YAMLUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLUnmarshalAsTf) | formatted variant | +| [`require.(*Assertions).YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/project/maintainers/ARCHITECTURE.md b/docs/doc-site/project/maintainers/ARCHITECTURE.md index 243c2d3c9..a2a693cbf 100644 --- a/docs/doc-site/project/maintainers/ARCHITECTURE.md +++ b/docs/doc-site/project/maintainers/ARCHITECTURE.md @@ -41,15 +41,18 @@ Fixes and enhancements propagate naturally to the variants without the need to r Each test assertion produces 2 base variants (assert, require). -Each of these variants produces another formatted variant. Except for generic assertions, we produce -one "forward" variant and one "forward formatted" variant (as methods). +Each of these variants produces another formatted variant, plus one "forward" variant and one +"forward formatted" variant (as methods of the `Assertions` type). -**For every non-generic assertion: 8 variants.** - -**For every generic assertion: 4 variants.** +**For every assertion: 8 variants.** **For every "helper" function (not an assertion): 2 variants.** +Generic assertions reach 8 variants only from go1.27, the first release that accepts type parameters +on methods. Their 4 method variants are generated into files guarded by `//go:build go1.27` +(`assert/assert_forward_go127.go`, `require/require_forward_go127.go`), so a go1.25 or go1.26 build +drops them and keeps the 4 package-level variants. The counts below assume go1.27. + All these variants make up several hundreds functions, which poses a challenge for maintenance and documentation. diff --git a/go.work b/go.work index b0d468430..7cb3e9216 100644 --- a/go.work +++ b/go.work @@ -9,9 +9,12 @@ use ( go 1.25.0 -// Dev/codegen toolchain floor. Must be >= the highest //go:build go1.N guard used in -// internal/assertions so codegen (run in workspace mode) always observes guarded files. -// Enforced by TestToolchainFloorCoversGuards. This line is NOT published to consumers: -// a dependency's toolchain directive is ignored downstream — only our go.mod `go 1.25.0` -// floor reaches them, so go1.25 users still build (guarded files excluded). -toolchain go1.26.0 +// Dev/codegen toolchain floor. Must be >= the highest //go:build go1.N guard in play: +// the guards written by hand in internal/assertions (enforced by TestToolchainFloorCoversGuards), +// and the go1.27 guard codegen stamps on the forward methods of the generic assertions. +// Below that floor, guarded files are dropped before the compiler sees them: codegen would +// emit incomplete output, and `go test ./...` would exercise none of the generic methods. +// This line is NOT published to consumers: a dependency's toolchain directive is ignored +// downstream — only our go.mod `go 1.25.0` floor reaches them, so go1.25 users still build +// (guarded files excluded). +toolchain go1.27.0 diff --git a/hack/doc-site/hugo/metrics.yaml b/hack/doc-site/hugo/metrics.yaml index 4ec16ab6b..0f8928f42 100644 --- a/hack/doc-site/hugo/metrics.yaml +++ b/hack/doc-site/hugo/metrics.yaml @@ -65,6 +65,6 @@ params: yaml: name: Yaml count: 5 - package_variants: 446 - total_variants: 892 - total_functions: 902 + package_variants: 556 + total_variants: 1112 + total_functions: 1122 diff --git a/require/require_forward.go b/require/require_forward.go index f469c7032..da35fd3a1 100644 --- a/require/require_forward.go +++ b/require/require_forward.go @@ -16,7 +16,8 @@ import ( // Assertions exposes all assertion functions as methods. // -// NOTE: assertion methods with parameterized types (generics) are not supported as methods. +// NOTE: generic assertions are exposed as methods only when built with go1.27 or newer, +// the first release that accepts type parameters on methods. // // Upon failure, the test [T] is marked as failed and stops execution. type Assertions struct { diff --git a/require/require_forward_go127.go b/require/require_forward_go127.go new file mode 100644 index 000000000..bd22556b5 --- /dev/null +++ b/require/require_forward_go127.go @@ -0,0 +1,1555 @@ +// 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. + +//go:build go1.27 + +package require + +import ( + "iter" + "time" + + "github.com/go-openapi/testify/v2/internal/assertions" +) + +// BlockedT is the same as [BlockedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) BlockedT[E any, CHAN ~chan E](ch CHAN, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.BlockedT[E, CHAN](a.T, ch, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// BlockedTf is the same as [Assertions.BlockedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.BlockedT[E, CHAN](a.T, ch, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// Consistently is the same as [Consistently], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.Consistently[C](a.T, condition, timeout, tick, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// Consistentlyf is the same as [Assertions.Consistently], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.Consistently[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// ElementsMatchT is the same as [ElementsMatchT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) ElementsMatchT[E comparable](listA []E, listB []E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.ElementsMatchT[E](a.T, listA, listB, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// ElementsMatchTf is the same as [Assertions.ElementsMatchT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.ElementsMatchT[E](a.T, listA, listB, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// EqualT is the same as [EqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) EqualT[V comparable](expected V, actual V, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.EqualT[V](a.T, expected, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// EqualTf is the same as [Assertions.EqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) EqualTf[V comparable](expected V, actual V, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.EqualT[V](a.T, expected, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// ErrorAsType is the same as [ErrorAsType], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) ErrorAsType[E error](err error, target *E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.ErrorAsType[E](a.T, err, target, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// ErrorAsTypef is the same as [Assertions.ErrorAsType], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) ErrorAsTypef[E error](err error, target *E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.ErrorAsType[E](a.T, err, target, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// Eventually is the same as [Eventually], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.Eventually[C](a.T, condition, timeout, tick, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// Eventuallyf is the same as [Assertions.Eventually], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.Eventually[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// EventuallyWith is the same as [EventuallyWith], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.EventuallyWith[C](a.T, condition, timeout, tick, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// EventuallyWithf is the same as [Assertions.EventuallyWith], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.EventuallyWith[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// FalseT is the same as [FalseT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) FalseT[B Boolean](value B, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.FalseT[B](a.T, value, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// FalseTf is the same as [Assertions.FalseT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) FalseTf[B Boolean](value B, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.FalseT[B](a.T, value, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// GreaterOrEqualT is the same as [GreaterOrEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.GreaterOrEqualT[Orderable](a.T, e1, e2, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// GreaterOrEqualTf is the same as [Assertions.GreaterOrEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.GreaterOrEqualT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// GreaterT is the same as [GreaterT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.GreaterT[Orderable](a.T, e1, e2, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// GreaterTf is the same as [Assertions.GreaterT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.GreaterT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// InDeltaT is the same as [InDeltaT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) InDeltaT[Number Measurable](expected Number, actual Number, delta Number, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.InDeltaT[Number](a.T, expected, actual, delta, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// InDeltaTf is the same as [Assertions.InDeltaT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.InDeltaT[Number](a.T, expected, actual, delta, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// InEpsilonSymmetricT is the same as [InEpsilonSymmetricT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.InEpsilonSymmetricT[Number](a.T, x, y, epsilon, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// InEpsilonSymmetricTf is the same as [Assertions.InEpsilonSymmetricT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.InEpsilonSymmetricT[Number](a.T, x, y, epsilon, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// InEpsilonT is the same as [InEpsilonT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.InEpsilonT[Number](a.T, expected, actual, epsilon, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// InEpsilonTf is the same as [Assertions.InEpsilonT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.InEpsilonT[Number](a.T, expected, actual, epsilon, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// IsDecreasingT is the same as [IsDecreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsDecreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// IsDecreasingTf is the same as [Assertions.IsDecreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsDecreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// IsIncreasingT is the same as [IsIncreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsIncreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// IsIncreasingTf is the same as [Assertions.IsIncreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsIncreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// IsNonDecreasingT is the same as [IsNonDecreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsNonDecreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// IsNonDecreasingTf is the same as [Assertions.IsNonDecreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsNonDecreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// IsNonIncreasingT is the same as [IsNonIncreasingT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsNonIncreasingT[OrderedSlice, E](a.T, collection, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// IsNonIncreasingTf is the same as [Assertions.IsNonIncreasingT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsNonIncreasingT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// IsNotOfTypeT is the same as [IsNotOfTypeT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsNotOfTypeT[EType any](object any, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsNotOfTypeT[EType](a.T, object, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// IsNotOfTypeTf is the same as [Assertions.IsNotOfTypeT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsNotOfTypeTf[EType any](object any, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsNotOfTypeT[EType](a.T, object, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// IsOfTypeT is the same as [IsOfTypeT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsOfTypeT[EType any](object any, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsOfTypeT[EType](a.T, object, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// IsOfTypeTf is the same as [Assertions.IsOfTypeT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) IsOfTypeTf[EType any](object any, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.IsOfTypeT[EType](a.T, object, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// JSONEqT is the same as [JSONEqT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.JSONEqT[EDoc, ADoc](a.T, expected, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// JSONEqTf is the same as [Assertions.JSONEqT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.JSONEqT[EDoc, ADoc](a.T, expected, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// JSONMarshalAsT is the same as [JSONMarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) JSONMarshalAsT[EDoc RText](expected EDoc, object any, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.JSONMarshalAsT[EDoc](a.T, expected, object, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// JSONMarshalAsTf is the same as [Assertions.JSONMarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.JSONMarshalAsT[EDoc](a.T, expected, object, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// JSONUnmarshalAsT is the same as [JSONUnmarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.JSONUnmarshalAsT[Object, ADoc](a.T, expected, jazon, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// JSONUnmarshalAsTf is the same as [Assertions.JSONUnmarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.JSONUnmarshalAsT[Object, ADoc](a.T, expected, jazon, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// LessOrEqualT is the same as [LessOrEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.LessOrEqualT[Orderable](a.T, e1, e2, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// LessOrEqualTf is the same as [Assertions.LessOrEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.LessOrEqualT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// LessT is the same as [LessT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) LessT[Orderable Ordered](e1 Orderable, e2 Orderable, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.LessT[Orderable](a.T, e1, e2, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// LessTf is the same as [Assertions.LessT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.LessT[Orderable](a.T, e1, e2, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// MapContainsT is the same as [MapContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapContainsT[Map, K, V](a.T, m, key, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// MapContainsTf is the same as [Assertions.MapContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapContainsT[Map, K, V](a.T, m, key, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// MapEqualT is the same as [MapEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapEqualT[K, V comparable](listA map[K]V, listB map[K]V, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapEqualT[K, V](a.T, listA, listB, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// MapEqualTf is the same as [Assertions.MapEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapEqualT[K, V](a.T, listA, listB, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// MapNotContainsT is the same as [MapNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapNotContainsT[Map, K, V](a.T, m, key, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// MapNotContainsTf is the same as [Assertions.MapNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapNotContainsT[Map, K, V](a.T, m, key, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// MapNotEqualT is the same as [MapNotEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapNotEqualT[K, V](a.T, listA, listB, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// MapNotEqualTf is the same as [Assertions.MapNotEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.MapNotEqualT[K, V](a.T, listA, listB, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NegativeT is the same as [NegativeT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NegativeT[SignedNumber SignedNumeric](e SignedNumber, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NegativeT[SignedNumber](a.T, e, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NegativeTf is the same as [Assertions.NegativeT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NegativeT[SignedNumber](a.T, e, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// Never is the same as [Never], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.Never[C](a.T, condition, timeout, tick, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// Neverf is the same as [Assertions.Never], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.Never[C](a.T, condition, timeout, tick, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotBlockedT is the same as [NotBlockedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotBlockedT[E any, CHAN ~chan E](ch CHAN, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotBlockedT[E, CHAN](a.T, ch, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotBlockedTf is the same as [Assertions.NotBlockedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotBlockedT[E, CHAN](a.T, ch, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotElementsMatchT is the same as [NotElementsMatchT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotElementsMatchT[E comparable](listA []E, listB []E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotElementsMatchT[E](a.T, listA, listB, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotElementsMatchTf is the same as [Assertions.NotElementsMatchT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotElementsMatchT[E](a.T, listA, listB, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotEqualT is the same as [NotEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotEqualT[V comparable](expected V, actual V, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotEqualT[V](a.T, expected, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotEqualTf is the same as [Assertions.NotEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotEqualTf[V comparable](expected V, actual V, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotEqualT[V](a.T, expected, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotErrorAsType is the same as [NotErrorAsType], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotErrorAsType[E error](err error, target *E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotErrorAsType[E](a.T, err, target, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotErrorAsTypef is the same as [Assertions.NotErrorAsType], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotErrorAsTypef[E error](err error, target *E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotErrorAsType[E](a.T, err, target, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotRegexpT is the same as [NotRegexpT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotRegexpT[Rex, ADoc](a.T, rx, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotRegexpTf is the same as [Assertions.NotRegexpT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotRegexpT[Rex, ADoc](a.T, rx, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotSameT is the same as [NotSameT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotSameT[P any](expected *P, actual *P, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotSameT[P](a.T, expected, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotSameTf is the same as [Assertions.NotSameT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotSameTf[P any](expected *P, actual *P, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotSameT[P](a.T, expected, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// NotSortedT is the same as [NotSortedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotSortedT[OrderedSlice, E](a.T, collection, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// NotSortedTf is the same as [Assertions.NotSortedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.NotSortedT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// PositiveT is the same as [PositiveT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) PositiveT[SignedNumber SignedNumeric](e SignedNumber, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.PositiveT[SignedNumber](a.T, e, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// PositiveTf is the same as [Assertions.PositiveT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.PositiveT[SignedNumber](a.T, e, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// RegexpT is the same as [RegexpT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.RegexpT[Rex, ADoc](a.T, rx, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// RegexpTf is the same as [Assertions.RegexpT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.RegexpT[Rex, ADoc](a.T, rx, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SameT is the same as [SameT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SameT[P any](expected *P, actual *P, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SameT[P](a.T, expected, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SameTf is the same as [Assertions.SameT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SameTf[P any](expected *P, actual *P, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SameT[P](a.T, expected, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SeqContainsT is the same as [SeqContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SeqContainsT[E comparable](iter iter.Seq[E], element E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SeqContainsT[E](a.T, iter, element, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SeqContainsTf is the same as [Assertions.SeqContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SeqContainsT[E](a.T, iter, element, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SeqNotContainsT is the same as [SeqNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SeqNotContainsT[E comparable](iter iter.Seq[E], element E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SeqNotContainsT[E](a.T, iter, element, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SeqNotContainsTf is the same as [Assertions.SeqNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SeqNotContainsT[E](a.T, iter, element, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SliceContainsT is the same as [SliceContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceContainsT[Slice ~[]E, E comparable](s Slice, element E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceContainsT[Slice, E](a.T, s, element, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SliceContainsTf is the same as [Assertions.SliceContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceContainsT[Slice, E](a.T, s, element, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SliceEqualT is the same as [SliceEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceEqualT[E comparable](listA []E, listB []E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceEqualT[E](a.T, listA, listB, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SliceEqualTf is the same as [Assertions.SliceEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceEqualT[E](a.T, listA, listB, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SliceNotContainsT is the same as [SliceNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceNotContainsT[Slice, E](a.T, s, element, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SliceNotContainsTf is the same as [Assertions.SliceNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceNotContainsT[Slice, E](a.T, s, element, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SliceNotEqualT is the same as [SliceNotEqualT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceNotEqualT[E comparable](listA []E, listB []E, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceNotEqualT[E](a.T, listA, listB, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SliceNotEqualTf is the same as [Assertions.SliceNotEqualT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceNotEqualT[E](a.T, listA, listB, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SliceNotSubsetT is the same as [SliceNotSubsetT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceNotSubsetT[Slice, E](a.T, list, subset, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SliceNotSubsetTf is the same as [Assertions.SliceNotSubsetT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceNotSubsetT[Slice, E](a.T, list, subset, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SliceSubsetT is the same as [SliceSubsetT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceSubsetT[Slice, E](a.T, list, subset, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SliceSubsetTf is the same as [Assertions.SliceSubsetT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SliceSubsetT[Slice, E](a.T, list, subset, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// SortedT is the same as [SortedT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SortedT[OrderedSlice, E](a.T, collection, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// SortedTf is the same as [Assertions.SortedT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.SortedT[OrderedSlice, E](a.T, collection, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// StringContainsT is the same as [StringContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.StringContainsT[ADoc, EDoc](a.T, str, substring, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// StringContainsTf is the same as [Assertions.StringContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.StringContainsT[ADoc, EDoc](a.T, str, substring, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// StringNotContainsT is the same as [StringNotContainsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.StringNotContainsT[ADoc, EDoc](a.T, str, substring, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// StringNotContainsTf is the same as [Assertions.StringNotContainsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.StringNotContainsT[ADoc, EDoc](a.T, str, substring, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// TrueT is the same as [TrueT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) TrueT[B Boolean](value B, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.TrueT[B](a.T, value, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// TrueTf is the same as [Assertions.TrueT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) TrueTf[B Boolean](value B, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.TrueT[B](a.T, value, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// YAMLEqT is the same as [YAMLEqT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.YAMLEqT[EDoc, ADoc](a.T, expected, actual, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// YAMLEqTf is the same as [Assertions.YAMLEqT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.YAMLEqT[EDoc, ADoc](a.T, expected, actual, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// YAMLMarshalAsT is the same as [YAMLMarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) YAMLMarshalAsT[EDoc RText](expected EDoc, object any, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.YAMLMarshalAsT[EDoc](a.T, expected, object, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// YAMLMarshalAsTf is the same as [Assertions.YAMLMarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.YAMLMarshalAsT[EDoc](a.T, expected, object, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} + +// YAMLUnmarshalAsT is the same as [YAMLUnmarshalAsT], as a method rather than a package-level function. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc, msgAndArgs ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.YAMLUnmarshalAsT[Object, ADoc](a.T, expected, yamlDoc, msgAndArgs...) { + return + } + + a.T.FailNow() +} + +// YAMLUnmarshalAsTf is the same as [Assertions.YAMLUnmarshalAsT], but it accepts a format string to format arguments like [fmt.Printf]. +// +// Upon failure, the test [T] is marked as failed and stops execution. +func (a *Assertions) YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ...any) { + if h, ok := a.T.(H); ok { + h.Helper() + } + if assertions.YAMLUnmarshalAsT[Object, ADoc](a.T, expected, yamlDoc, forwardArgs(msg, args)...) { + return + } + + a.T.FailNow() +} diff --git a/require/require_forward_go127_test.go b/require/require_forward_go127_test.go new file mode 100644 index 000000000..345d2cc74 --- /dev/null +++ b/require/require_forward_go127_test.go @@ -0,0 +1,2741 @@ +// 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. + +//go:build go1.27 + +package require + +import ( + "fmt" + "slices" + "testing" + "time" +) + +func TestAssertionsBlockedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.BlockedT(make(chan struct{})) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.BlockedT(sendChanMessage()) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.BlockedT should call FailNow()") + } + }) +} + +func TestAssertionsConsistently(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Consistently(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Consistently(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.Consistently should call FailNow()") + } + }) +} + +func TestAssertionsElementsMatchT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ElementsMatchT([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ElementsMatchT([]int{1, 2, 3}, []int{1, 2, 4}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.ElementsMatchT should call FailNow()") + } + }) +} + +func TestAssertionsEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EqualT(123, 123) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EqualT(123, 456) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.EqualT should call FailNow()") + } + }) +} + +func TestAssertionsErrorAsType(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ErrorAsType(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError)) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ErrorAsType(ErrTest, new(*dummyError)) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.ErrorAsType should call FailNow()") + } + }) +} + +func TestAssertionsEventually(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Eventually(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Eventually(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.Eventually should call FailNow()") + } + }) +} + +func TestAssertionsEventuallyWith(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EventuallyWith(func(c *CollectT) { True(c, true) }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EventuallyWith(func(c *CollectT) { False(c, true) }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.EventuallyWith should call FailNow()") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EventuallyWith(func(c *CollectT) { c.Cancel() }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.EventuallyWith should call FailNow()") + } + }) +} + +func TestAssertionsFalseT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.FalseT(1 == 0) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.FalseT(1 == 1) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.FalseT should call FailNow()") + } + }) +} + +func TestAssertionsGreaterOrEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterOrEqualT(2, 1) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterOrEqualT(1, 2) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.GreaterOrEqualT should call FailNow()") + } + }) +} + +func TestAssertionsGreaterT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterT(2, 1) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterT(1, 2) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.GreaterT should call FailNow()") + } + }) +} + +func TestAssertionsInDeltaT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InDeltaT(1.0, 1.01, 0.02) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InDeltaT(1.0, 1.1, 0.05) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.InDeltaT should call FailNow()") + } + }) +} + +func TestAssertionsInEpsilonSymmetricT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonSymmetricT(100.0, 101.0, 0.02) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonSymmetricT(100.0, 110.0, 0.05) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.InEpsilonSymmetricT should call FailNow()") + } + }) +} + +func TestAssertionsInEpsilonT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonT(100.0, 101.0, 0.02) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonT(100.0, 110.0, 0.05) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.InEpsilonT should call FailNow()") + } + }) +} + +func TestAssertionsIsDecreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsDecreasingT([]int{3, 2, 1}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsDecreasingT([]int{1, 2, 3}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsDecreasingT should call FailNow()") + } + }) +} + +func TestAssertionsIsIncreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsIncreasingT([]int{1, 2, 3}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsIncreasingT([]int{1, 1, 2}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsIncreasingT should call FailNow()") + } + }) +} + +func TestAssertionsIsNonDecreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonDecreasingT([]int{1, 1, 2}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonDecreasingT([]int{2, 1, 0}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsNonDecreasingT should call FailNow()") + } + }) +} + +func TestAssertionsIsNonIncreasingT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonIncreasingT([]int{2, 1, 1}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonIncreasingT([]int{1, 2, 3}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsNonIncreasingT should call FailNow()") + } + }) +} + +func TestAssertionsIsNotOfTypeT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNotOfTypeT[myType](123.123) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNotOfTypeT[myType](myType(123.123)) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsNotOfTypeT should call FailNow()") + } + }) +} + +func TestAssertionsIsOfTypeT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsOfTypeT[myType](myType(123.123)) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsOfTypeT[myType](123.123) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsOfTypeT should call FailNow()") + } + }) +} + +func TestAssertionsJSONEqT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONEqT(`{"hello": "world", "foo": "bar"}`, []byte(`{"foo": "bar", "hello": "world"}`)) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONEqT(`{"hello": "world", "foo": "bar"}`, `[{"foo": "bar"}, {"hello": "world"}]`) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.JSONEqT should call FailNow()") + } + }) +} + +func TestAssertionsJSONMarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONMarshalAsT([]byte(`{"A": "a"}`), dummyStruct{A: "a"}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONMarshalAsT(`[{"foo": "bar"}, {"hello": "world"}]`, 1) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.JSONMarshalAsT should call FailNow()") + } + }) +} + +func TestAssertionsJSONUnmarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONUnmarshalAsT(dummyStruct{A: "a"}, []byte(`{"A": "a"}`)) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONUnmarshalAsT(1, `[{"foo": "bar"}, {"hello": "world"}]`) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.JSONUnmarshalAsT should call FailNow()") + } + }) +} + +func TestAssertionsLessOrEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessOrEqualT(1, 2) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessOrEqualT(2, 1) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.LessOrEqualT should call FailNow()") + } + }) +} + +func TestAssertionsLessT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessT(1, 2) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessT(2, 1) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.LessT should call FailNow()") + } + }) +} + +func TestAssertionsMapContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapContainsT(map[string]string{"A": "B"}, "A") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapContainsT(map[string]string{"A": "B"}, "C") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapContainsT should call FailNow()") + } + }) +} + +func TestAssertionsMapEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapEqualT(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapEqualT(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapEqualT should call FailNow()") + } + }) +} + +func TestAssertionsMapNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotContainsT(map[string]string{"A": "B"}, "C") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotContainsT(map[string]string{"A": "B"}, "A") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapNotContainsT should call FailNow()") + } + }) +} + +func TestAssertionsMapNotEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotEqualT(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotEqualT(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapNotEqualT should call FailNow()") + } + }) +} + +func TestAssertionsNegativeT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NegativeT(-1) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NegativeT(1) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NegativeT should call FailNow()") + } + }) +} + +func TestAssertionsNever(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Never(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Never(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.Never should call FailNow()") + } + }) +} + +func TestAssertionsNotBlockedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotBlockedT(sendChanMessage()) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotBlockedT(make(chan struct{})) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotBlockedT should call FailNow()") + } + }) +} + +func TestAssertionsNotElementsMatchT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotElementsMatchT([]int{1, 2, 3}, []int{1, 2, 4}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotElementsMatchT([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotElementsMatchT should call FailNow()") + } + }) +} + +func TestAssertionsNotEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotEqualT(123, 456) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotEqualT(123, 123) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotEqualT should call FailNow()") + } + }) +} + +func TestAssertionsNotErrorAsType(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotErrorAsType(ErrTest, new(*dummyError)) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotErrorAsType(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError)) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotErrorAsType should call FailNow()") + } + }) +} + +func TestAssertionsNotRegexpT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotRegexpT("^start", "not starting") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotRegexpT("^start", "starting") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotRegexpT should call FailNow()") + } + }) +} + +func TestAssertionsNotSameT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSameT(&staticVar, ptr("static string")) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSameT(&staticVar, staticVarPtr) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotSameT should call FailNow()") + } + }) +} + +func TestAssertionsNotSortedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSortedT([]int{3, 1, 3}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSortedT([]int{1, 4, 8}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotSortedT should call FailNow()") + } + }) +} + +func TestAssertionsPositiveT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.PositiveT(1) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.PositiveT(-1) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.PositiveT should call FailNow()") + } + }) +} + +func TestAssertionsRegexpT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.RegexpT("^start", "starting") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.RegexpT("^start", "not starting") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.RegexpT should call FailNow()") + } + }) +} + +func TestAssertionsSameT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SameT(&staticVar, staticVarPtr) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SameT(&staticVar, ptr("static string")) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SameT should call FailNow()") + } + }) +} + +func TestAssertionsSeqContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqContainsT(slices.Values([]string{"A", "B"}), "A") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqContainsT(slices.Values([]string{"A", "B"}), "C") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SeqContainsT should call FailNow()") + } + }) +} + +func TestAssertionsSeqNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqNotContainsT(slices.Values([]string{"A", "B"}), "C") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqNotContainsT(slices.Values([]string{"A", "B"}), "A") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SeqNotContainsT should call FailNow()") + } + }) +} + +func TestAssertionsSliceContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceContainsT([]string{"A", "B"}, "A") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceContainsT([]string{"A", "B"}, "C") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceContainsT should call FailNow()") + } + }) +} + +func TestAssertionsSliceEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceEqualT([]string{"Hello", "World"}, []string{"Hello", "World"}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceEqualT([]string{"Hello", "World"}, []string{"Hello"}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceEqualT should call FailNow()") + } + }) +} + +func TestAssertionsSliceNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotContainsT([]string{"A", "B"}, "C") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotContainsT([]string{"A", "B"}, "A") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceNotContainsT should call FailNow()") + } + }) +} + +func TestAssertionsSliceNotEqualT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotEqualT([]string{"Hello", "World"}, []string{"Hello"}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotEqualT([]string{"Hello", "World"}, []string{"Hello", "World"}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceNotEqualT should call FailNow()") + } + }) +} + +func TestAssertionsSliceNotSubsetT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotSubsetT([]int{1, 2, 3}, []int{4, 5}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotSubsetT([]int{1, 2, 3}, []int{1, 2}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceNotSubsetT should call FailNow()") + } + }) +} + +func TestAssertionsSliceSubsetT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceSubsetT([]int{1, 2, 3}, []int{1, 2}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceSubsetT([]int{1, 2, 3}, []int{4, 5}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceSubsetT should call FailNow()") + } + }) +} + +func TestAssertionsSortedT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SortedT([]int{1, 1, 3}) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SortedT([]int{1, 4, 2}) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SortedT should call FailNow()") + } + }) +} + +func TestAssertionsStringContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringContainsT("AB", "A") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringContainsT("AB", "C") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.StringContainsT should call FailNow()") + } + }) +} + +func TestAssertionsStringNotContainsT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringNotContainsT("AB", "C") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringNotContainsT("AB", "A") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.StringNotContainsT should call FailNow()") + } + }) +} + +func TestAssertionsTrueT(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.TrueT(1 == 1) + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.TrueT(1 == 0) + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.TrueT should call FailNow()") + } + }) +} + +func TestAssertionsYAMLEqT(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Panics(func() { + a.YAMLEqT("key: value", "key: value") + }, "should panic without the yaml feature enabled.") + if mock.failed { + t.Error("Assertions.YAMLEqT should panic as expected") + } + }) +} + +func TestAssertionsYAMLMarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Panics(func() { + a.YAMLMarshalAsT("key: value", "key: value") + }, "should panic without the yaml feature enabled.") + if mock.failed { + t.Error("Assertions.YAMLMarshalAsT should panic as expected") + } + }) +} + +func TestAssertionsYAMLUnmarshalAsT(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Panics(func() { + a.YAMLUnmarshalAsT("key: value", "key: value") + }, "should panic without the yaml feature enabled.") + if mock.failed { + t.Error("Assertions.YAMLUnmarshalAsT should panic as expected") + } + }) +} + +func TestAssertionsBlockedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.BlockedTf(make(chan struct{}), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.BlockedTf(sendChanMessage(), "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.BlockedTf should call FailNow()") + } + }) +} + +func TestAssertionsConsistentlyf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Consistentlyf(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Consistentlyf(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.Consistentlyf should call FailNow()") + } + }) +} + +func TestAssertionsElementsMatchTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ElementsMatchTf([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ElementsMatchTf([]int{1, 2, 3}, []int{1, 2, 4}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.ElementsMatchTf should call FailNow()") + } + }) +} + +func TestAssertionsEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EqualTf(123, 123, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EqualTf(123, 456, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.EqualTf should call FailNow()") + } + }) +} + +func TestAssertionsErrorAsTypef(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ErrorAsTypef(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.ErrorAsTypef(ErrTest, new(*dummyError), "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.ErrorAsTypef should call FailNow()") + } + }) +} + +func TestAssertionsEventuallyf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Eventuallyf(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Eventuallyf(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.Eventuallyf should call FailNow()") + } + }) +} + +func TestAssertionsEventuallyWithf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EventuallyWithf(func(c *CollectT) { True(c, true) }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EventuallyWithf(func(c *CollectT) { False(c, true) }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.EventuallyWithf should call FailNow()") + } + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.EventuallyWithf(func(c *CollectT) { c.Cancel() }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.EventuallyWithf should call FailNow()") + } + }) +} + +func TestAssertionsFalseTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.FalseTf(1 == 0, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.FalseTf(1 == 1, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.FalseTf should call FailNow()") + } + }) +} + +func TestAssertionsGreaterOrEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterOrEqualTf(2, 1, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterOrEqualTf(1, 2, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.GreaterOrEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsGreaterTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterTf(2, 1, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.GreaterTf(1, 2, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.GreaterTf should call FailNow()") + } + }) +} + +func TestAssertionsInDeltaTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InDeltaTf(1.0, 1.01, 0.02, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InDeltaTf(1.0, 1.1, 0.05, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.InDeltaTf should call FailNow()") + } + }) +} + +func TestAssertionsInEpsilonSymmetricTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonSymmetricTf(100.0, 101.0, 0.02, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonSymmetricTf(100.0, 110.0, 0.05, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.InEpsilonSymmetricTf should call FailNow()") + } + }) +} + +func TestAssertionsInEpsilonTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonTf(100.0, 101.0, 0.02, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.InEpsilonTf(100.0, 110.0, 0.05, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.InEpsilonTf should call FailNow()") + } + }) +} + +func TestAssertionsIsDecreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsDecreasingTf([]int{3, 2, 1}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsDecreasingTf([]int{1, 2, 3}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsDecreasingTf should call FailNow()") + } + }) +} + +func TestAssertionsIsIncreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsIncreasingTf([]int{1, 2, 3}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsIncreasingTf([]int{1, 1, 2}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsIncreasingTf should call FailNow()") + } + }) +} + +func TestAssertionsIsNonDecreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonDecreasingTf([]int{1, 1, 2}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonDecreasingTf([]int{2, 1, 0}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsNonDecreasingTf should call FailNow()") + } + }) +} + +func TestAssertionsIsNonIncreasingTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonIncreasingTf([]int{2, 1, 1}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNonIncreasingTf([]int{1, 2, 3}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsNonIncreasingTf should call FailNow()") + } + }) +} + +func TestAssertionsIsNotOfTypeTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNotOfTypeTf[myType](123.123, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsNotOfTypeTf[myType](myType(123.123), "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsNotOfTypeTf should call FailNow()") + } + }) +} + +func TestAssertionsIsOfTypeTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsOfTypeTf[myType](myType(123.123), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.IsOfTypeTf[myType](123.123, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.IsOfTypeTf should call FailNow()") + } + }) +} + +func TestAssertionsJSONEqTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONEqTf(`{"hello": "world", "foo": "bar"}`, []byte(`{"foo": "bar", "hello": "world"}`), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONEqTf(`{"hello": "world", "foo": "bar"}`, `[{"foo": "bar"}, {"hello": "world"}]`, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.JSONEqTf should call FailNow()") + } + }) +} + +func TestAssertionsJSONMarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONMarshalAsTf([]byte(`{"A": "a"}`), dummyStruct{A: "a"}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONMarshalAsTf(`[{"foo": "bar"}, {"hello": "world"}]`, 1, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.JSONMarshalAsTf should call FailNow()") + } + }) +} + +func TestAssertionsJSONUnmarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONUnmarshalAsTf(dummyStruct{A: "a"}, []byte(`{"A": "a"}`), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.JSONUnmarshalAsTf(1, `[{"foo": "bar"}, {"hello": "world"}]`, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.JSONUnmarshalAsTf should call FailNow()") + } + }) +} + +func TestAssertionsLessOrEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessOrEqualTf(1, 2, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessOrEqualTf(2, 1, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.LessOrEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsLessTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessTf(1, 2, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.LessTf(2, 1, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.LessTf should call FailNow()") + } + }) +} + +func TestAssertionsMapContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapContainsTf(map[string]string{"A": "B"}, "A", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapContainsTf(map[string]string{"A": "B"}, "C", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsMapEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapEqualTf(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapEqualTf(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsMapNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotContainsTf(map[string]string{"A": "B"}, "C", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotContainsTf(map[string]string{"A": "B"}, "A", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapNotContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsMapNotEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotEqualTf(map[string]string{"2": "Hello", "1": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.MapNotEqualTf(map[string]string{"1": "Hello", "2": "World"}, map[string]string{"1": "Hello", "2": "World"}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.MapNotEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsNegativeTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NegativeTf(-1, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NegativeTf(1, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NegativeTf should call FailNow()") + } + }) +} + +func TestAssertionsNeverf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Neverf(func() bool { return false }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Neverf(func() bool { return true }, 100*time.Millisecond, 20*time.Millisecond, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.Neverf should call FailNow()") + } + }) +} + +func TestAssertionsNotBlockedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotBlockedTf(sendChanMessage(), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotBlockedTf(make(chan struct{}), "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotBlockedTf should call FailNow()") + } + }) +} + +func TestAssertionsNotElementsMatchTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotElementsMatchTf([]int{1, 2, 3}, []int{1, 2, 4}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotElementsMatchTf([]int{1, 3, 2, 3}, []int{1, 3, 3, 2}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotElementsMatchTf should call FailNow()") + } + }) +} + +func TestAssertionsNotEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotEqualTf(123, 456, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotEqualTf(123, 123, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsNotErrorAsTypef(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotErrorAsTypef(ErrTest, new(*dummyError), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotErrorAsTypef(fmt.Errorf("wrap: %w", &dummyError{}), new(*dummyError), "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotErrorAsTypef should call FailNow()") + } + }) +} + +func TestAssertionsNotRegexpTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotRegexpTf("^start", "not starting", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotRegexpTf("^start", "starting", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotRegexpTf should call FailNow()") + } + }) +} + +func TestAssertionsNotSameTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSameTf(&staticVar, ptr("static string"), "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSameTf(&staticVar, staticVarPtr, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotSameTf should call FailNow()") + } + }) +} + +func TestAssertionsNotSortedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSortedTf([]int{3, 1, 3}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.NotSortedTf([]int{1, 4, 8}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.NotSortedTf should call FailNow()") + } + }) +} + +func TestAssertionsPositiveTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.PositiveTf(1, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.PositiveTf(-1, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.PositiveTf should call FailNow()") + } + }) +} + +func TestAssertionsRegexpTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.RegexpTf("^start", "starting", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.RegexpTf("^start", "not starting", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.RegexpTf should call FailNow()") + } + }) +} + +func TestAssertionsSameTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SameTf(&staticVar, staticVarPtr, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SameTf(&staticVar, ptr("static string"), "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SameTf should call FailNow()") + } + }) +} + +func TestAssertionsSeqContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqContainsTf(slices.Values([]string{"A", "B"}), "A", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqContainsTf(slices.Values([]string{"A", "B"}), "C", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SeqContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsSeqNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqNotContainsTf(slices.Values([]string{"A", "B"}), "C", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SeqNotContainsTf(slices.Values([]string{"A", "B"}), "A", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SeqNotContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsSliceContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceContainsTf([]string{"A", "B"}, "A", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceContainsTf([]string{"A", "B"}, "C", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsSliceEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceEqualTf([]string{"Hello", "World"}, []string{"Hello", "World"}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceEqualTf([]string{"Hello", "World"}, []string{"Hello"}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsSliceNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotContainsTf([]string{"A", "B"}, "C", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotContainsTf([]string{"A", "B"}, "A", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceNotContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsSliceNotEqualTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotEqualTf([]string{"Hello", "World"}, []string{"Hello"}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotEqualTf([]string{"Hello", "World"}, []string{"Hello", "World"}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceNotEqualTf should call FailNow()") + } + }) +} + +func TestAssertionsSliceNotSubsetTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotSubsetTf([]int{1, 2, 3}, []int{4, 5}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceNotSubsetTf([]int{1, 2, 3}, []int{1, 2}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceNotSubsetTf should call FailNow()") + } + }) +} + +func TestAssertionsSliceSubsetTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceSubsetTf([]int{1, 2, 3}, []int{1, 2}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SliceSubsetTf([]int{1, 2, 3}, []int{4, 5}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SliceSubsetTf should call FailNow()") + } + }) +} + +func TestAssertionsSortedTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SortedTf([]int{1, 1, 3}, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.SortedTf([]int{1, 4, 2}, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.SortedTf should call FailNow()") + } + }) +} + +func TestAssertionsStringContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringContainsTf("AB", "A", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringContainsTf("AB", "C", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.StringContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsStringNotContainsTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringNotContainsTf("AB", "C", "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.StringNotContainsTf("AB", "A", "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.StringNotContainsTf should call FailNow()") + } + }) +} + +func TestAssertionsTrueTf(t *testing.T) { + t.Parallel() + + t.Run("success", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.TrueTf(1 == 1, "test message") + // require functions don't return a value + }) + + t.Run("failure", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.TrueTf(1 == 0, "test message") + // require functions don't return a value + if !mock.failed { + t.Error("Assertions.TrueTf should call FailNow()") + } + }) +} + +func TestAssertionsYAMLEqTf(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Panics(func() { + a.YAMLEqTf("key: value", "key: value", "test message") + }, "should panic without the yaml feature enabled.") + if mock.failed { + t.Error("Assertions.YAMLEqTf should panic as expected") + } + }) +} + +func TestAssertionsYAMLMarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Panics(func() { + a.YAMLMarshalAsTf("key: value", "key: value", "test message") + }, "should panic without the yaml feature enabled.") + if mock.failed { + t.Error("Assertions.YAMLMarshalAsTf should panic as expected") + } + }) +} + +func TestAssertionsYAMLUnmarshalAsTf(t *testing.T) { + t.Parallel() + + t.Run("panic", func(t *testing.T) { + t.Parallel() + + mock := new(mockFailNowT) + a := New(mock) + a.Panics(func() { + a.YAMLUnmarshalAsTf("key: value", "key: value", "test message") + }, "should panic without the yaml feature enabled.") + if mock.failed { + t.Error("Assertions.YAMLUnmarshalAsTf should panic as expected") + } + }) +} From bb4e0dfb49271d0762f0826e757cade21f1227fb Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Sun, 23 Aug 2026 17:58:05 +0200 Subject: [PATCH 2/3] doc(codegen): correct the signature tables on the API pages The per-function tabs rendered by doc_page.md.gotmpl listed signatures the generated packages do not have: - every require row carried a bool return, though a require assertion calls FailNow instead of returning: `require.Equal(t T, ...) bool`; - the method formatted row dropped the return for assert, and spelled its variadic `args ..any`; - helpers picked up formatted and method rows, so common.md linked to require.CallerInfof and (*Assertions).ObjectsAreEqual, neither of which is generated: assertion_helpers.gotmpl emits the package-level function alone, with no t T parameter to format against. The template now blanks the return for a require assertion, keeps it for a require helper such as CallerInfo, and renders the three variant rows only for assertions. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Frederic BIDON --- .../generator/templates/doc_page.md.gotmpl | 17 +- docs/doc-site/api/boolean.md | 40 +-- docs/doc-site/api/collection.md | 230 +++++++++--------- docs/doc-site/api/common.md | 18 -- docs/doc-site/api/comparison.md | 120 ++++----- docs/doc-site/api/condition.md | 90 +++---- docs/doc-site/api/equality.md | 160 ++++++------ docs/doc-site/api/error.md | 100 ++++---- docs/doc-site/api/file.md | 60 ++--- docs/doc-site/api/http.md | 66 +++-- docs/doc-site/api/json.md | 50 ++-- docs/doc-site/api/number.md | 90 +++---- docs/doc-site/api/ordering.md | 100 ++++---- docs/doc-site/api/panic.md | 40 +-- docs/doc-site/api/safety.md | 20 +- docs/doc-site/api/string.md | 40 +-- docs/doc-site/api/testing.md | 20 +- docs/doc-site/api/time.md | 20 +- docs/doc-site/api/type.md | 100 ++++---- docs/doc-site/api/yaml.md | 50 ++-- 20 files changed, 705 insertions(+), 726 deletions(-) diff --git a/codegen/internal/generator/templates/doc_page.md.gotmpl b/codegen/internal/generator/templates/doc_page.md.gotmpl index f6c01f815..959efc2bd 100644 --- a/codegen/internal/generator/templates/doc_page.md.gotmpl +++ b/codegen/internal/generator/templates/doc_page.md.gotmpl @@ -42,18 +42,21 @@ {{- with $extraPackages }} {{- range .LookupFunction $funcName }} + {{- $returns := returns .Returns }} + {{- if and (eq .Package "require") (not .IsHelper) }}{{ $returns = "" }}{{ end }}{{/* a require assertion calls FailNow instead of returning */}} + {{- $hasVariants := not .IsHelper }}{{/* helpers are generated as package-level functions only */}} {{ hopen }}% tab title="{{ .Package }}" style="secondary" %{{ hclose }} | Signature | Usage | |--|--| -| [`{{.Package }}.{{ .GenericName }}({{ params .AllParams }}) {{ returns .Returns }}`]({{ $godoc }}/{{ .Package }}#{{ .Name }}) | package-level function | - {{- if .EnableFormat }} -| [`{{ .Package }}.{{ .GenericName "f" }}(t T, {{ params .Params }}, msg string, args ...any) {{ returns .Returns }}`]({{ $godoc }}/{{ .Package }}#{{ .Name }}f) | formatted variant | +| [`{{.Package }}.{{ .GenericName }}({{ params .AllParams }}){{ with $returns }} {{ . }}{{ end }}`]({{ $godoc }}/{{ .Package }}#{{ .Name }}) | package-level function | + {{- if and .EnableFormat $hasVariants }} +| [`{{ .Package }}.{{ .GenericName "f" }}(t T, {{ params .Params }}, msg string, args ...any){{ with $returns }} {{ . }}{{ end }}`]({{ $godoc }}/{{ .Package }}#{{ .Name }}f) | formatted variant | {{- end }} - {{- if .EnableForward }} -| [`{{ .Package}}.(*{{ .Receiver }}).{{ .GenericName }}({{ params .Params }}) {{ returns .Returns }}`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}) | method variant{{ if .IsGeneric }} {{ hopen }}% goversion "{{ .ForwardGoBuild }}" %{{ hclose }}{{ end }} | + {{- if and .EnableForward $hasVariants }} +| [`{{ .Package}}.(*{{ .Receiver }}).{{ .GenericName }}({{ params .Params }}){{ with $returns }} {{ . }}{{ end }}`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}) | method variant{{ if .IsGeneric }} {{ hopen }}% goversion "{{ .ForwardGoBuild }}" %{{ hclose }}{{ end }} | {{- end }} - {{- if and .EnableForward .EnableFormat }} -| [`{{ .Package }}.(*{{ .Receiver }}).{{ .GenericName "f" }}({{ params .Params }}, msg string, args ..any)`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}f) | method formatted variant{{ if .IsGeneric }} {{ hopen }}% goversion "{{ .ForwardGoBuild }}" %{{ hclose }}{{ end }} | + {{- if and .EnableForward .EnableFormat $hasVariants }} +| [`{{ .Package }}.(*{{ .Receiver }}).{{ .GenericName "f" }}({{ params .Params }}, msg string, args ...any){{ with $returns }} {{ . }}{{ end }}`]({{ $godoc }}/{{ .Package }}#{{ .Receiver }}.{{ .Name }}f) | method formatted variant{{ if .IsGeneric }} {{ hopen }}% goversion "{{ .ForwardGoBuild }}" %{{ hclose }}{{ end }} | {{- end }} {{ hopen }}% /tab %{{ hclose }} {{- end }} diff --git a/docs/doc-site/api/boolean.md b/docs/doc-site/api/boolean.md index bc8648369..09bca551a 100644 --- a/docs/doc-site/api/boolean.md +++ b/docs/doc-site/api/boolean.md @@ -128,15 +128,15 @@ func main() { | [`assert.False(t T, value bool, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#False) | package-level function | | [`assert.Falsef(t T, value bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Falsef) | formatted variant | | [`assert.(*Assertions).False(value bool) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.False) | method variant | -| [`assert.(*Assertions).Falsef(value bool, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Falsef) | method formatted variant | +| [`assert.(*Assertions).Falsef(value bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Falsef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.False(t T, value bool, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#False) | package-level function | -| [`require.Falsef(t T, value bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Falsef) | formatted variant | -| [`require.(*Assertions).False(value bool) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.False) | method variant | -| [`require.(*Assertions).Falsef(value bool, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Falsef) | method formatted variant | +| [`require.False(t T, value bool, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#False) | package-level function | +| [`require.Falsef(t T, value bool, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Falsef) | formatted variant | +| [`require.(*Assertions).False(value bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.False) | method variant | +| [`require.(*Assertions).Falsef(value bool, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Falsef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -243,15 +243,15 @@ func main() { | [`assert.FalseT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FalseT) | package-level function | | [`assert.FalseTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FalseTf) | formatted variant | | [`assert.(*Assertions).FalseT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FalseT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).FalseTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FalseTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).FalseTf[B Boolean](value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FalseTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.FalseT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FalseT) | package-level function | -| [`require.FalseTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FalseTf) | formatted variant | -| [`require.(*Assertions).FalseT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FalseT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).FalseTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FalseTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.FalseT[B Boolean](t T, value B, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FalseT) | package-level function | +| [`require.FalseTf[B Boolean](t T, value B, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FalseTf) | formatted variant | +| [`require.(*Assertions).FalseT[B Boolean](value B)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FalseT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).FalseTf[B Boolean](value B, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FalseTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -354,15 +354,15 @@ func main() { | [`assert.True(t T, value bool, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#True) | package-level function | | [`assert.Truef(t T, value bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Truef) | formatted variant | | [`assert.(*Assertions).True(value bool) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.True) | method variant | -| [`assert.(*Assertions).Truef(value bool, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Truef) | method formatted variant | +| [`assert.(*Assertions).Truef(value bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Truef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.True(t T, value bool, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#True) | package-level function | -| [`require.Truef(t T, value bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Truef) | formatted variant | -| [`require.(*Assertions).True(value bool) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.True) | method variant | -| [`require.(*Assertions).Truef(value bool, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Truef) | method formatted variant | +| [`require.True(t T, value bool, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#True) | package-level function | +| [`require.Truef(t T, value bool, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Truef) | formatted variant | +| [`require.(*Assertions).True(value bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.True) | method variant | +| [`require.(*Assertions).Truef(value bool, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Truef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -469,15 +469,15 @@ func main() { | [`assert.TrueT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#TrueT) | package-level function | | [`assert.TrueTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#TrueTf) | formatted variant | | [`assert.(*Assertions).TrueT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.TrueT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).TrueTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.TrueTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).TrueTf[B Boolean](value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.TrueTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.TrueT[B Boolean](t T, value B, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#TrueT) | package-level function | -| [`require.TrueTf[B Boolean](t T, value B, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#TrueTf) | formatted variant | -| [`require.(*Assertions).TrueT[B Boolean](value B) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.TrueT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).TrueTf[B Boolean](value B, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.TrueTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.TrueT[B Boolean](t T, value B, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#TrueT) | package-level function | +| [`require.TrueTf[B Boolean](t T, value B, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#TrueTf) | formatted variant | +| [`require.(*Assertions).TrueT[B Boolean](value B)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.TrueT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).TrueTf[B Boolean](value B, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.TrueTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/collection.md b/docs/doc-site/api/collection.md index 62c4d6fee..a5dd9cc12 100644 --- a/docs/doc-site/api/collection.md +++ b/docs/doc-site/api/collection.md @@ -188,15 +188,15 @@ func main() { | [`assert.Contains(t T, s any, contains any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Contains) | package-level function | | [`assert.Containsf(t T, s any, contains any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Containsf) | formatted variant | | [`assert.(*Assertions).Contains(s any, contains any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Contains) | method variant | -| [`assert.(*Assertions).Containsf(s any, contains any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Containsf) | method formatted variant | +| [`assert.(*Assertions).Containsf(s any, contains any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Containsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Contains(t T, s any, contains any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Contains) | package-level function | -| [`require.Containsf(t T, s any, contains any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Containsf) | formatted variant | -| [`require.(*Assertions).Contains(s any, contains any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Contains) | method variant | -| [`require.(*Assertions).Containsf(s any, contains any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Containsf) | method formatted variant | +| [`require.Contains(t T, s any, contains any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Contains) | package-level function | +| [`require.Containsf(t T, s any, contains any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Containsf) | formatted variant | +| [`require.(*Assertions).Contains(s any, contains any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Contains) | method variant | +| [`require.(*Assertions).Containsf(s any, contains any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Containsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -301,15 +301,15 @@ func main() { | [`assert.ElementsMatch(t T, listA any, listB any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ElementsMatch) | package-level function | | [`assert.ElementsMatchf(t T, listA any, listB any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ElementsMatchf) | formatted variant | | [`assert.(*Assertions).ElementsMatch(listA any, listB any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatch) | method variant | -| [`assert.(*Assertions).ElementsMatchf(listA any, listB any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchf) | method formatted variant | +| [`assert.(*Assertions).ElementsMatchf(listA any, listB any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.ElementsMatch(t T, listA any, listB any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatch) | package-level function | -| [`require.ElementsMatchf(t T, listA any, listB any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchf) | formatted variant | -| [`require.(*Assertions).ElementsMatch(listA any, listB any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatch) | method variant | -| [`require.(*Assertions).ElementsMatchf(listA any, listB any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchf) | method formatted variant | +| [`require.ElementsMatch(t T, listA any, listB any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatch) | package-level function | +| [`require.ElementsMatchf(t T, listA any, listB any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchf) | formatted variant | +| [`require.(*Assertions).ElementsMatch(listA any, listB any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatch) | method variant | +| [`require.(*Assertions).ElementsMatchf(listA any, listB any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -414,15 +414,15 @@ func main() { | [`assert.ElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ElementsMatchT) | package-level function | | [`assert.ElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ElementsMatchTf) | formatted variant | | [`assert.(*Assertions).ElementsMatchT[E comparable](listA []E, listB []E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.ElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchT) | package-level function | -| [`require.ElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchTf) | formatted variant | -| [`require.(*Assertions).ElementsMatchT[E comparable](listA []E, listB []E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.ElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchT) | package-level function | +| [`require.ElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ElementsMatchTf) | formatted variant | +| [`require.(*Assertions).ElementsMatchT[E comparable](listA []E, listB []E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).ElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -531,15 +531,15 @@ func main() { | [`assert.Len(t T, object any, length int, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Len) | package-level function | | [`assert.Lenf(t T, object any, length int, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Lenf) | formatted variant | | [`assert.(*Assertions).Len(object any, length int) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Len) | method variant | -| [`assert.(*Assertions).Lenf(object any, length int, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Lenf) | method formatted variant | +| [`assert.(*Assertions).Lenf(object any, length int, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Lenf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Len(t T, object any, length int, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Len) | package-level function | -| [`require.Lenf(t T, object any, length int, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Lenf) | formatted variant | -| [`require.(*Assertions).Len(object any, length int) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Len) | method variant | -| [`require.(*Assertions).Lenf(object any, length int, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Lenf) | method formatted variant | +| [`require.Len(t T, object any, length int, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Len) | package-level function | +| [`require.Lenf(t T, object any, length int, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Lenf) | formatted variant | +| [`require.(*Assertions).Len(object any, length int)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Len) | method variant | +| [`require.(*Assertions).Lenf(object any, length int, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Lenf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -649,15 +649,15 @@ func main() { | [`assert.MapContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapContainsT) | package-level function | | [`assert.MapContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapContainsTf) | formatted variant | | [`assert.(*Assertions).MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.MapContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapContainsT) | package-level function | -| [`require.MapContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapContainsTf) | formatted variant | -| [`require.(*Assertions).MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.MapContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapContainsT) | package-level function | +| [`require.MapContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapContainsTf) | formatted variant | +| [`require.(*Assertions).MapContainsT[Map ~map[K]V, K comparable, V any](m Map, key K)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -765,15 +765,15 @@ func main() { | [`assert.MapEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapEqualT) | package-level function | | [`assert.MapEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapEqualTf) | formatted variant | | [`assert.(*Assertions).MapEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.MapEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapEqualT) | package-level function | -| [`require.MapEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapEqualTf) | formatted variant | -| [`require.(*Assertions).MapEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.MapEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapEqualT) | package-level function | +| [`require.MapEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapEqualTf) | formatted variant | +| [`require.(*Assertions).MapEqualT[K, V comparable](listA map[K]V, listB map[K]V)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -876,15 +876,15 @@ func main() { | [`assert.MapNotContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotContainsT) | package-level function | | [`assert.MapNotContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotContainsTf) | formatted variant | | [`assert.(*Assertions).MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.MapNotContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotContainsT) | package-level function | -| [`require.MapNotContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotContainsTf) | formatted variant | -| [`require.(*Assertions).MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.MapNotContainsT[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotContainsT) | package-level function | +| [`require.MapNotContainsTf[Map ~map[K]V, K comparable, V any](t T, m Map, key K, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotContainsTf) | formatted variant | +| [`require.(*Assertions).MapNotContainsT[Map ~map[K]V, K comparable, V any](m Map, key K)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapNotContainsTf[Map ~map[K]V, K comparable, V any](m Map, key K, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -991,15 +991,15 @@ func main() { | [`assert.MapNotEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotEqualT) | package-level function | | [`assert.MapNotEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#MapNotEqualTf) | formatted variant | | [`assert.(*Assertions).MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.MapNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.MapNotEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotEqualT) | package-level function | -| [`require.MapNotEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotEqualTf) | formatted variant | -| [`require.(*Assertions).MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.MapNotEqualT[K, V comparable](t T, listA map[K]V, listB map[K]V, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotEqualT) | package-level function | +| [`require.MapNotEqualTf[K, V comparable](t T, listA map[K]V, listB map[K]V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#MapNotEqualTf) | formatted variant | +| [`require.(*Assertions).MapNotEqualT[K, V comparable](listA map[K]V, listB map[K]V)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).MapNotEqualTf[K, V comparable](listA map[K]V, listB map[K]V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.MapNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1105,15 +1105,15 @@ func main() { | [`assert.NotContains(t T, s any, contains any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotContains) | package-level function | | [`assert.NotContainsf(t T, s any, contains any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotContainsf) | formatted variant | | [`assert.(*Assertions).NotContains(s any, contains any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotContains) | method variant | -| [`assert.(*Assertions).NotContainsf(s any, contains any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotContainsf) | method formatted variant | +| [`assert.(*Assertions).NotContainsf(s any, contains any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotContainsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotContains(t T, s any, contains any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotContains) | package-level function | -| [`require.NotContainsf(t T, s any, contains any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotContainsf) | formatted variant | -| [`require.(*Assertions).NotContains(s any, contains any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotContains) | method variant | -| [`require.(*Assertions).NotContainsf(s any, contains any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotContainsf) | method formatted variant | +| [`require.NotContains(t T, s any, contains any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotContains) | package-level function | +| [`require.NotContainsf(t T, s any, contains any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotContainsf) | formatted variant | +| [`require.(*Assertions).NotContains(s any, contains any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotContains) | method variant | +| [`require.(*Assertions).NotContainsf(s any, contains any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotContainsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1221,15 +1221,15 @@ func main() { | [`assert.NotElementsMatch(t T, listA any, listB any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotElementsMatch) | package-level function | | [`assert.NotElementsMatchf(t T, listA any, listB any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotElementsMatchf) | formatted variant | | [`assert.(*Assertions).NotElementsMatch(listA any, listB any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatch) | method variant | -| [`assert.(*Assertions).NotElementsMatchf(listA any, listB any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchf) | method formatted variant | +| [`assert.(*Assertions).NotElementsMatchf(listA any, listB any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotElementsMatch(t T, listA any, listB any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatch) | package-level function | -| [`require.NotElementsMatchf(t T, listA any, listB any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchf) | formatted variant | -| [`require.(*Assertions).NotElementsMatch(listA any, listB any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatch) | method variant | -| [`require.(*Assertions).NotElementsMatchf(listA any, listB any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchf) | method formatted variant | +| [`require.NotElementsMatch(t T, listA any, listB any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatch) | package-level function | +| [`require.NotElementsMatchf(t T, listA any, listB any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchf) | formatted variant | +| [`require.(*Assertions).NotElementsMatch(listA any, listB any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatch) | method variant | +| [`require.(*Assertions).NotElementsMatchf(listA any, listB any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1337,15 +1337,15 @@ func main() { | [`assert.NotElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotElementsMatchT) | package-level function | | [`assert.NotElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotElementsMatchTf) | formatted variant | | [`assert.(*Assertions).NotElementsMatchT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchT) | package-level function | -| [`require.NotElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchTf) | formatted variant | -| [`require.(*Assertions).NotElementsMatchT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotElementsMatchT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchT) | package-level function | +| [`require.NotElementsMatchTf[E comparable](t T, listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotElementsMatchTf) | formatted variant | +| [`require.(*Assertions).NotElementsMatchT[E comparable](listA []E, listB []E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotElementsMatchTf[E comparable](listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotElementsMatchTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1454,15 +1454,15 @@ func main() { | [`assert.NotSubset(t T, list any, subset any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSubset) | package-level function | | [`assert.NotSubsetf(t T, list any, subset any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSubsetf) | formatted variant | | [`assert.(*Assertions).NotSubset(list any, subset any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSubset) | method variant | -| [`assert.(*Assertions).NotSubsetf(list any, subset any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSubsetf) | method formatted variant | +| [`assert.(*Assertions).NotSubsetf(list any, subset any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSubsetf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotSubset(t T, list any, subset any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSubset) | package-level function | -| [`require.NotSubsetf(t T, list any, subset any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSubsetf) | formatted variant | -| [`require.(*Assertions).NotSubset(list any, subset any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSubset) | method variant | -| [`require.(*Assertions).NotSubsetf(list any, subset any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSubsetf) | method formatted variant | +| [`require.NotSubset(t T, list any, subset any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSubset) | package-level function | +| [`require.NotSubsetf(t T, list any, subset any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSubsetf) | formatted variant | +| [`require.(*Assertions).NotSubset(list any, subset any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSubset) | method variant | +| [`require.(*Assertions).NotSubsetf(list any, subset any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSubsetf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1571,15 +1571,15 @@ func main() { | [`assert.SeqContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqContainsT) | package-level function | | [`assert.SeqContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqContainsTf) | formatted variant | | [`assert.(*Assertions).SeqContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SeqContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqContainsT) | package-level function | -| [`require.SeqContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqContainsTf) | formatted variant | -| [`require.(*Assertions).SeqContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SeqContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqContainsT) | package-level function | +| [`require.SeqContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqContainsTf) | formatted variant | +| [`require.(*Assertions).SeqContainsT[E comparable](iter iter.Seq[E], element E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SeqContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1686,15 +1686,15 @@ func main() { | [`assert.SeqNotContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqNotContainsT) | package-level function | | [`assert.SeqNotContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SeqNotContainsTf) | formatted variant | | [`assert.(*Assertions).SeqNotContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SeqNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SeqNotContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqNotContainsT) | package-level function | -| [`require.SeqNotContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqNotContainsTf) | formatted variant | -| [`require.(*Assertions).SeqNotContainsT[E comparable](iter iter.Seq[E], element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SeqNotContainsT[E comparable](t T, iter iter.Seq[E], element E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqNotContainsT) | package-level function | +| [`require.SeqNotContainsTf[E comparable](t T, iter iter.Seq[E], element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SeqNotContainsTf) | formatted variant | +| [`require.(*Assertions).SeqNotContainsT[E comparable](iter iter.Seq[E], element E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SeqNotContainsTf[E comparable](iter iter.Seq[E], element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SeqNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1799,15 +1799,15 @@ func main() { | [`assert.SliceContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceContainsT) | package-level function | | [`assert.SliceContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceContainsTf) | formatted variant | | [`assert.(*Assertions).SliceContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SliceContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceContainsT) | package-level function | -| [`require.SliceContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceContainsTf) | formatted variant | -| [`require.(*Assertions).SliceContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SliceContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceContainsT) | package-level function | +| [`require.SliceContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceContainsTf) | formatted variant | +| [`require.(*Assertions).SliceContainsT[Slice ~[]E, E comparable](s Slice, element E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1915,15 +1915,15 @@ func main() { | [`assert.SliceEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceEqualT) | package-level function | | [`assert.SliceEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceEqualTf) | formatted variant | | [`assert.(*Assertions).SliceEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SliceEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceEqualT) | package-level function | -| [`require.SliceEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceEqualTf) | formatted variant | -| [`require.(*Assertions).SliceEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SliceEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceEqualT) | package-level function | +| [`require.SliceEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceEqualTf) | formatted variant | +| [`require.(*Assertions).SliceEqualT[E comparable](listA []E, listB []E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceEqualTf[E comparable](listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2028,15 +2028,15 @@ func main() { | [`assert.SliceNotContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotContainsT) | package-level function | | [`assert.SliceNotContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotContainsTf) | formatted variant | | [`assert.(*Assertions).SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SliceNotContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotContainsT) | package-level function | -| [`require.SliceNotContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotContainsTf) | formatted variant | -| [`require.(*Assertions).SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SliceNotContainsT[Slice ~[]E, E comparable](t T, s Slice, element E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotContainsT) | package-level function | +| [`require.SliceNotContainsTf[Slice ~[]E, E comparable](t T, s Slice, element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotContainsTf) | formatted variant | +| [`require.(*Assertions).SliceNotContainsT[Slice ~[]E, E comparable](s Slice, element E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceNotContainsTf[Slice ~[]E, E comparable](s Slice, element E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2143,15 +2143,15 @@ func main() { | [`assert.SliceNotEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotEqualT) | package-level function | | [`assert.SliceNotEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotEqualTf) | formatted variant | | [`assert.(*Assertions).SliceNotEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SliceNotEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotEqualT) | package-level function | -| [`require.SliceNotEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotEqualTf) | formatted variant | -| [`require.(*Assertions).SliceNotEqualT[E comparable](listA []E, listB []E) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SliceNotEqualT[E comparable](t T, listA []E, listB []E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotEqualT) | package-level function | +| [`require.SliceNotEqualTf[E comparable](t T, listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotEqualTf) | formatted variant | +| [`require.(*Assertions).SliceNotEqualT[E comparable](listA []E, listB []E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceNotEqualTf[E comparable](listA []E, listB []E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2254,15 +2254,15 @@ func main() { | [`assert.SliceNotSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotSubsetT) | package-level function | | [`assert.SliceNotSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceNotSubsetTf) | formatted variant | | [`assert.(*Assertions).SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotSubsetT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceNotSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SliceNotSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotSubsetT) | package-level function | -| [`require.SliceNotSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotSubsetTf) | formatted variant | -| [`require.(*Assertions).SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotSubsetT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SliceNotSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotSubsetT) | package-level function | +| [`require.SliceNotSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceNotSubsetTf) | formatted variant | +| [`require.(*Assertions).SliceNotSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotSubsetT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceNotSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceNotSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2365,15 +2365,15 @@ func main() { | [`assert.SliceSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceSubsetT) | package-level function | | [`assert.SliceSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SliceSubsetTf) | formatted variant | | [`assert.(*Assertions).SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceSubsetT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SliceSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SliceSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceSubsetT) | package-level function | -| [`require.SliceSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceSubsetTf) | formatted variant | -| [`require.(*Assertions).SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceSubsetT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SliceSubsetT[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceSubsetT) | package-level function | +| [`require.SliceSubsetTf[Slice ~[]E, E comparable](t T, list Slice, subset Slice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SliceSubsetTf) | formatted variant | +| [`require.(*Assertions).SliceSubsetT[Slice ~[]E, E comparable](list Slice, subset Slice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceSubsetT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SliceSubsetTf[Slice ~[]E, E comparable](list Slice, subset Slice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SliceSubsetTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2478,15 +2478,15 @@ func main() { | [`assert.StringContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringContainsT) | package-level function | | [`assert.StringContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringContainsTf) | formatted variant | | [`assert.(*Assertions).StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.StringContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringContainsT) | package-level function | -| [`require.StringContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringContainsTf) | formatted variant | -| [`require.(*Assertions).StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.StringContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringContainsT) | package-level function | +| [`require.StringContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringContainsTf) | formatted variant | +| [`require.(*Assertions).StringContainsT[ADoc, EDoc Text](str ADoc, substring EDoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).StringContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2591,15 +2591,15 @@ func main() { | [`assert.StringNotContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringNotContainsT) | package-level function | | [`assert.StringNotContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#StringNotContainsTf) | formatted variant | | [`assert.(*Assertions).StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.StringNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.StringNotContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringNotContainsT) | package-level function | -| [`require.StringNotContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringNotContainsTf) | formatted variant | -| [`require.(*Assertions).StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringNotContainsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.StringNotContainsT[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringNotContainsT) | package-level function | +| [`require.StringNotContainsTf[ADoc, EDoc Text](t T, str ADoc, substring EDoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#StringNotContainsTf) | formatted variant | +| [`require.(*Assertions).StringNotContainsT[ADoc, EDoc Text](str ADoc, substring EDoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringNotContainsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).StringNotContainsTf[ADoc, EDoc Text](str ADoc, substring EDoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.StringNotContainsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2711,15 +2711,15 @@ func main() { | [`assert.Subset(t T, list any, subset any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Subset) | package-level function | | [`assert.Subsetf(t T, list any, subset any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Subsetf) | formatted variant | | [`assert.(*Assertions).Subset(list any, subset any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Subset) | method variant | -| [`assert.(*Assertions).Subsetf(list any, subset any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Subsetf) | method formatted variant | +| [`assert.(*Assertions).Subsetf(list any, subset any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Subsetf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Subset(t T, list any, subset any, msgAndArgs ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Subset) | package-level function | -| [`require.Subsetf(t T, list any, subset any, msg string, args ...any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Subsetf) | formatted variant | -| [`require.(*Assertions).Subset(list any, subset any) (ok bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Subset) | method variant | -| [`require.(*Assertions).Subsetf(list any, subset any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Subsetf) | method formatted variant | +| [`require.Subset(t T, list any, subset any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Subset) | package-level function | +| [`require.Subsetf(t T, list any, subset any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Subsetf) | formatted variant | +| [`require.(*Assertions).Subset(list any, subset any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Subset) | method variant | +| [`require.(*Assertions).Subsetf(list any, subset any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Subsetf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/common.md b/docs/doc-site/api/common.md index d960ae6e4..3e7b26867 100644 --- a/docs/doc-site/api/common.md +++ b/docs/doc-site/api/common.md @@ -43,17 +43,11 @@ failed. | Signature | Usage | |--|--| | [`assert.CallerInfo() []string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#CallerInfo) | package-level function | -| [`assert.CallerInfof(t T, , msg string, args ...any) []string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#CallerInfof) | formatted variant | -| [`assert.(*Assertions).CallerInfo() []string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.CallerInfo) | method variant | -| [`assert.(*Assertions).CallerInfof(, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.CallerInfof) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.CallerInfo() []string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#CallerInfo) | package-level function | -| [`require.CallerInfof(t T, , msg string, args ...any) []string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#CallerInfof) | formatted variant | -| [`require.(*Assertions).CallerInfo() []string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.CallerInfo) | method variant | -| [`require.(*Assertions).CallerInfof(, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.CallerInfof) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -82,17 +76,11 @@ This function does no assertion of any kind. | Signature | Usage | |--|--| | [`assert.ObjectsAreEqual(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ObjectsAreEqual) | package-level function | -| [`assert.ObjectsAreEqualf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ObjectsAreEqualf) | formatted variant | -| [`assert.(*Assertions).ObjectsAreEqual(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ObjectsAreEqual) | method variant | -| [`assert.(*Assertions).ObjectsAreEqualf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ObjectsAreEqualf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.ObjectsAreEqual(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ObjectsAreEqual) | package-level function | -| [`require.ObjectsAreEqualf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ObjectsAreEqualf) | formatted variant | -| [`require.(*Assertions).ObjectsAreEqual(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ObjectsAreEqual) | method variant | -| [`require.(*Assertions).ObjectsAreEqualf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ObjectsAreEqualf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -115,17 +103,11 @@ values are equal. | Signature | Usage | |--|--| | [`assert.ObjectsAreEqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ObjectsAreEqualValues) | package-level function | -| [`assert.ObjectsAreEqualValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ObjectsAreEqualValuesf) | formatted variant | -| [`assert.(*Assertions).ObjectsAreEqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ObjectsAreEqualValues) | method variant | -| [`assert.(*Assertions).ObjectsAreEqualValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ObjectsAreEqualValuesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.ObjectsAreEqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ObjectsAreEqualValues) | package-level function | -| [`require.ObjectsAreEqualValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ObjectsAreEqualValuesf) | formatted variant | -| [`require.(*Assertions).ObjectsAreEqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ObjectsAreEqualValues) | method variant | -| [`require.(*Assertions).ObjectsAreEqualValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ObjectsAreEqualValuesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/comparison.md b/docs/doc-site/api/comparison.md index 15657014f..c14260da9 100644 --- a/docs/doc-site/api/comparison.md +++ b/docs/doc-site/api/comparison.md @@ -157,15 +157,15 @@ func main() { | [`assert.Greater(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Greater) | package-level function | | [`assert.Greaterf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Greaterf) | formatted variant | | [`assert.(*Assertions).Greater(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Greater) | method variant | -| [`assert.(*Assertions).Greaterf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Greaterf) | method formatted variant | +| [`assert.(*Assertions).Greaterf(e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Greaterf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Greater(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Greater) | package-level function | -| [`require.Greaterf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Greaterf) | formatted variant | -| [`require.(*Assertions).Greater(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Greater) | method variant | -| [`require.(*Assertions).Greaterf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Greaterf) | method formatted variant | +| [`require.Greater(t T, e1 any, e2 any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Greater) | package-level function | +| [`require.Greaterf(t T, e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Greaterf) | formatted variant | +| [`require.(*Assertions).Greater(e1 any, e2 any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Greater) | method variant | +| [`require.(*Assertions).Greaterf(e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Greaterf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -273,15 +273,15 @@ func main() { | [`assert.GreaterOrEqual(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterOrEqual) | package-level function | | [`assert.GreaterOrEqualf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterOrEqualf) | formatted variant | | [`assert.(*Assertions).GreaterOrEqual(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqual) | method variant | -| [`assert.(*Assertions).GreaterOrEqualf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualf) | method formatted variant | +| [`assert.(*Assertions).GreaterOrEqualf(e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.GreaterOrEqual(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqual) | package-level function | -| [`require.GreaterOrEqualf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualf) | formatted variant | -| [`require.(*Assertions).GreaterOrEqual(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqual) | method variant | -| [`require.(*Assertions).GreaterOrEqualf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualf) | method formatted variant | +| [`require.GreaterOrEqual(t T, e1 any, e2 any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqual) | package-level function | +| [`require.GreaterOrEqualf(t T, e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualf) | formatted variant | +| [`require.(*Assertions).GreaterOrEqual(e1 any, e2 any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqual) | method variant | +| [`require.(*Assertions).GreaterOrEqualf(e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -398,15 +398,15 @@ func main() { | [`assert.GreaterOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterOrEqualT) | package-level function | | [`assert.GreaterOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterOrEqualTf) | formatted variant | | [`assert.(*Assertions).GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.GreaterOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualT) | package-level function | -| [`require.GreaterOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualTf) | formatted variant | -| [`require.(*Assertions).GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.GreaterOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualT) | package-level function | +| [`require.GreaterOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterOrEqualTf) | formatted variant | +| [`require.(*Assertions).GreaterOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).GreaterOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -522,15 +522,15 @@ func main() { | [`assert.GreaterT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterT) | package-level function | | [`assert.GreaterTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#GreaterTf) | formatted variant | | [`assert.(*Assertions).GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.GreaterTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.GreaterT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterT) | package-level function | -| [`require.GreaterTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterTf) | formatted variant | -| [`require.(*Assertions).GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.GreaterT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterT) | package-level function | +| [`require.GreaterTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#GreaterTf) | formatted variant | +| [`require.(*Assertions).GreaterT[Orderable Ordered](e1 Orderable, e2 Orderable)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).GreaterTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.GreaterTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -638,15 +638,15 @@ func main() { | [`assert.Less(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Less) | package-level function | | [`assert.Lessf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Lessf) | formatted variant | | [`assert.(*Assertions).Less(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Less) | method variant | -| [`assert.(*Assertions).Lessf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Lessf) | method formatted variant | +| [`assert.(*Assertions).Lessf(e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Lessf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Less(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Less) | package-level function | -| [`require.Lessf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Lessf) | formatted variant | -| [`require.(*Assertions).Less(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Less) | method variant | -| [`require.(*Assertions).Lessf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Lessf) | method formatted variant | +| [`require.Less(t T, e1 any, e2 any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Less) | package-level function | +| [`require.Lessf(t T, e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Lessf) | formatted variant | +| [`require.(*Assertions).Less(e1 any, e2 any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Less) | method variant | +| [`require.(*Assertions).Lessf(e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Lessf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -752,15 +752,15 @@ func main() { | [`assert.LessOrEqual(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessOrEqual) | package-level function | | [`assert.LessOrEqualf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessOrEqualf) | formatted variant | | [`assert.(*Assertions).LessOrEqual(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqual) | method variant | -| [`assert.(*Assertions).LessOrEqualf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualf) | method formatted variant | +| [`assert.(*Assertions).LessOrEqualf(e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.LessOrEqual(t T, e1 any, e2 any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqual) | package-level function | -| [`require.LessOrEqualf(t T, e1 any, e2 any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualf) | formatted variant | -| [`require.(*Assertions).LessOrEqual(e1 any, e2 any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqual) | method variant | -| [`require.(*Assertions).LessOrEqualf(e1 any, e2 any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualf) | method formatted variant | +| [`require.LessOrEqual(t T, e1 any, e2 any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqual) | package-level function | +| [`require.LessOrEqualf(t T, e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualf) | formatted variant | +| [`require.(*Assertions).LessOrEqual(e1 any, e2 any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqual) | method variant | +| [`require.(*Assertions).LessOrEqualf(e1 any, e2 any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -876,15 +876,15 @@ func main() { | [`assert.LessOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessOrEqualT) | package-level function | | [`assert.LessOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessOrEqualTf) | formatted variant | | [`assert.(*Assertions).LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.LessOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualT) | package-level function | -| [`require.LessOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualTf) | formatted variant | -| [`require.(*Assertions).LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.LessOrEqualT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualT) | package-level function | +| [`require.LessOrEqualTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessOrEqualTf) | formatted variant | +| [`require.(*Assertions).LessOrEqualT[Orderable Ordered](e1 Orderable, e2 Orderable)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).LessOrEqualTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessOrEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -999,15 +999,15 @@ func main() { | [`assert.LessT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessT) | package-level function | | [`assert.LessTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#LessTf) | formatted variant | | [`assert.(*Assertions).LessT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.LessTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.LessT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessT) | package-level function | -| [`require.LessTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessTf) | formatted variant | -| [`require.(*Assertions).LessT[Orderable Ordered](e1 Orderable, e2 Orderable) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.LessT[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessT) | package-level function | +| [`require.LessTf[Orderable Ordered](t T, e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#LessTf) | formatted variant | +| [`require.(*Assertions).LessT[Orderable Ordered](e1 Orderable, e2 Orderable)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).LessTf[Orderable Ordered](e1 Orderable, e2 Orderable, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.LessTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1111,15 +1111,15 @@ func main() { | [`assert.Negative(t T, e any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Negative) | package-level function | | [`assert.Negativef(t T, e any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Negativef) | formatted variant | | [`assert.(*Assertions).Negative(e any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Negative) | method variant | -| [`assert.(*Assertions).Negativef(e any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Negativef) | method formatted variant | +| [`assert.(*Assertions).Negativef(e any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Negativef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Negative(t T, e any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Negative) | package-level function | -| [`require.Negativef(t T, e any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Negativef) | formatted variant | -| [`require.(*Assertions).Negative(e any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Negative) | method variant | -| [`require.(*Assertions).Negativef(e any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Negativef) | method formatted variant | +| [`require.Negative(t T, e any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Negative) | package-level function | +| [`require.Negativef(t T, e any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Negativef) | formatted variant | +| [`require.(*Assertions).Negative(e any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Negative) | method variant | +| [`require.(*Assertions).Negativef(e any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Negativef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1223,15 +1223,15 @@ func main() { | [`assert.NegativeT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NegativeT) | package-level function | | [`assert.NegativeTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NegativeTf) | formatted variant | | [`assert.(*Assertions).NegativeT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NegativeT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NegativeTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NegativeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NegativeT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NegativeT) | package-level function | -| [`require.NegativeTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NegativeTf) | formatted variant | -| [`require.(*Assertions).NegativeT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NegativeT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NegativeTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NegativeT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NegativeT) | package-level function | +| [`require.NegativeTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NegativeTf) | formatted variant | +| [`require.(*Assertions).NegativeT[SignedNumber SignedNumeric](e SignedNumber)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NegativeT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NegativeTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NegativeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1335,15 +1335,15 @@ func main() { | [`assert.Positive(t T, e any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Positive) | package-level function | | [`assert.Positivef(t T, e any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Positivef) | formatted variant | | [`assert.(*Assertions).Positive(e any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Positive) | method variant | -| [`assert.(*Assertions).Positivef(e any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Positivef) | method formatted variant | +| [`assert.(*Assertions).Positivef(e any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Positivef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Positive(t T, e any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Positive) | package-level function | -| [`require.Positivef(t T, e any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Positivef) | formatted variant | -| [`require.(*Assertions).Positive(e any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Positive) | method variant | -| [`require.(*Assertions).Positivef(e any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Positivef) | method formatted variant | +| [`require.Positive(t T, e any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Positive) | package-level function | +| [`require.Positivef(t T, e any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Positivef) | formatted variant | +| [`require.(*Assertions).Positive(e any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Positive) | method variant | +| [`require.(*Assertions).Positivef(e any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Positivef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1447,15 +1447,15 @@ func main() { | [`assert.PositiveT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PositiveT) | package-level function | | [`assert.PositiveTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PositiveTf) | formatted variant | | [`assert.(*Assertions).PositiveT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PositiveT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PositiveTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PositiveTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.PositiveT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PositiveT) | package-level function | -| [`require.PositiveTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PositiveTf) | formatted variant | -| [`require.(*Assertions).PositiveT[SignedNumber SignedNumeric](e SignedNumber) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PositiveT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PositiveTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.PositiveT[SignedNumber SignedNumeric](t T, e SignedNumber, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PositiveT) | package-level function | +| [`require.PositiveTf[SignedNumber SignedNumeric](t T, e SignedNumber, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PositiveTf) | formatted variant | +| [`require.(*Assertions).PositiveT[SignedNumber SignedNumeric](e SignedNumber)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PositiveT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).PositiveTf[SignedNumber SignedNumeric](e SignedNumber, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PositiveTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/condition.md b/docs/doc-site/api/condition.md index 0a7dd912a..46c9a8b4a 100644 --- a/docs/doc-site/api/condition.md +++ b/docs/doc-site/api/condition.md @@ -146,15 +146,15 @@ func main() { | [`assert.Blocked(t T, ch any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Blocked) | package-level function | | [`assert.Blockedf(t T, ch any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Blockedf) | formatted variant | | [`assert.(*Assertions).Blocked(ch any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Blocked) | method variant | -| [`assert.(*Assertions).Blockedf(ch any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Blockedf) | method formatted variant | +| [`assert.(*Assertions).Blockedf(ch any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Blockedf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Blocked(t T, ch any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Blocked) | package-level function | -| [`require.Blockedf(t T, ch any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Blockedf) | formatted variant | -| [`require.(*Assertions).Blocked(ch any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Blocked) | method variant | -| [`require.(*Assertions).Blockedf(ch any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Blockedf) | method formatted variant | +| [`require.Blocked(t T, ch any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Blocked) | package-level function | +| [`require.Blockedf(t T, ch any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Blockedf) | formatted variant | +| [`require.(*Assertions).Blocked(ch any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Blocked) | method variant | +| [`require.(*Assertions).Blockedf(ch any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Blockedf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -258,15 +258,15 @@ func main() { | [`assert.BlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#BlockedT) | package-level function | | [`assert.BlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#BlockedTf) | formatted variant | | [`assert.(*Assertions).BlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.BlockedT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.BlockedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.BlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.BlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#BlockedT) | package-level function | -| [`require.BlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#BlockedTf) | formatted variant | -| [`require.(*Assertions).BlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.BlockedT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.BlockedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.BlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#BlockedT) | package-level function | +| [`require.BlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#BlockedTf) | formatted variant | +| [`require.(*Assertions).BlockedT[E any, CHAN ~chan E](ch CHAN)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.BlockedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).BlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.BlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -373,15 +373,15 @@ func main() { | [`assert.Condition(t T, comp func() bool, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Condition) | package-level function | | [`assert.Conditionf(t T, comp func() bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Conditionf) | formatted variant | | [`assert.(*Assertions).Condition(comp func() bool) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Condition) | method variant | -| [`assert.(*Assertions).Conditionf(comp func() bool, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Conditionf) | method formatted variant | +| [`assert.(*Assertions).Conditionf(comp func() bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Conditionf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Condition(t T, comp func() bool, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Condition) | package-level function | -| [`require.Conditionf(t T, comp func() bool, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Conditionf) | formatted variant | -| [`require.(*Assertions).Condition(comp func() bool) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Condition) | method variant | -| [`require.(*Assertions).Conditionf(comp func() bool, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Conditionf) | method formatted variant | +| [`require.Condition(t T, comp func() bool, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Condition) | package-level function | +| [`require.Conditionf(t T, comp func() bool, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Conditionf) | formatted variant | +| [`require.(*Assertions).Condition(comp func() bool)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Condition) | method variant | +| [`require.(*Assertions).Conditionf(comp func() bool, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Conditionf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -760,15 +760,15 @@ func main() { | [`assert.Consistently[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Consistently) | package-level function | | [`assert.Consistentlyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Consistentlyf) | formatted variant | | [`assert.(*Assertions).Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Consistently) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Consistentlyf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Consistentlyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Consistently[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Consistently) | package-level function | -| [`require.Consistentlyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Consistentlyf) | formatted variant | -| [`require.(*Assertions).Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Consistently) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Consistentlyf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.Consistently[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Consistently) | package-level function | +| [`require.Consistentlyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Consistentlyf) | formatted variant | +| [`require.(*Assertions).Consistently[C Conditioner](condition C, timeout time.Duration, tick time.Duration)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Consistently) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).Consistentlyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Consistentlyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1286,15 +1286,15 @@ func main() { | [`assert.Eventually[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Eventually) | package-level function | | [`assert.Eventuallyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Eventuallyf) | formatted variant | | [`assert.(*Assertions).Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Eventually) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Eventuallyf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Eventuallyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Eventually[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Eventually) | package-level function | -| [`require.Eventuallyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Eventuallyf) | formatted variant | -| [`require.(*Assertions).Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Eventually) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Eventuallyf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.Eventually[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Eventually) | package-level function | +| [`require.Eventuallyf[C Conditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Eventuallyf) | formatted variant | +| [`require.(*Assertions).Eventually[C Conditioner](condition C, timeout time.Duration, tick time.Duration)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Eventually) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).Eventuallyf[C Conditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Eventuallyf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1537,15 +1537,15 @@ func main() { | [`assert.EventuallyWith[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EventuallyWith) | package-level function | | [`assert.EventuallyWithf[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EventuallyWithf) | formatted variant | | [`assert.(*Assertions).EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EventuallyWith) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EventuallyWithf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EventuallyWithf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.EventuallyWith[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EventuallyWith) | package-level function | -| [`require.EventuallyWithf[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EventuallyWithf) | formatted variant | -| [`require.(*Assertions).EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EventuallyWith) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EventuallyWithf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.EventuallyWith[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EventuallyWith) | package-level function | +| [`require.EventuallyWithf[C CollectibleConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EventuallyWithf) | formatted variant | +| [`require.(*Assertions).EventuallyWith[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EventuallyWith) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).EventuallyWithf[C CollectibleConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EventuallyWithf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1841,15 +1841,15 @@ func main() { | [`assert.Never[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Never) | package-level function | | [`assert.Neverf[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Neverf) | formatted variant | | [`assert.(*Assertions).Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Never) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Neverf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Neverf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Never[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Never) | package-level function | -| [`require.Neverf[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Neverf) | formatted variant | -| [`require.(*Assertions).Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Never) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Neverf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.Never[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Never) | package-level function | +| [`require.Neverf[C NeverConditioner](t T, condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Neverf) | formatted variant | +| [`require.(*Assertions).Never[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Never) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).Neverf[C NeverConditioner](condition C, timeout time.Duration, tick time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Neverf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1973,15 +1973,15 @@ func sendChanMessage() chan struct{} { | [`assert.NotBlocked(t T, ch any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotBlocked) | package-level function | | [`assert.NotBlockedf(t T, ch any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotBlockedf) | formatted variant | | [`assert.(*Assertions).NotBlocked(ch any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlocked) | method variant | -| [`assert.(*Assertions).NotBlockedf(ch any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedf) | method formatted variant | +| [`assert.(*Assertions).NotBlockedf(ch any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotBlocked(t T, ch any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlocked) | package-level function | -| [`require.NotBlockedf(t T, ch any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedf) | formatted variant | -| [`require.(*Assertions).NotBlocked(ch any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlocked) | method variant | -| [`require.(*Assertions).NotBlockedf(ch any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedf) | method formatted variant | +| [`require.NotBlocked(t T, ch any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlocked) | package-level function | +| [`require.NotBlockedf(t T, ch any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedf) | formatted variant | +| [`require.(*Assertions).NotBlocked(ch any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlocked) | method variant | +| [`require.(*Assertions).NotBlockedf(ch any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -2103,15 +2103,15 @@ func sendChanMessage() chan struct{} { | [`assert.NotBlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotBlockedT) | package-level function | | [`assert.NotBlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotBlockedTf) | formatted variant | | [`assert.(*Assertions).NotBlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotBlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotBlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedT) | package-level function | -| [`require.NotBlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedTf) | formatted variant | -| [`require.(*Assertions).NotBlockedT[E any, CHAN ~chan E](ch CHAN) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotBlockedT[E any, CHAN ~chan E](t T, ch CHAN, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedT) | package-level function | +| [`require.NotBlockedTf[E any, CHAN ~chan E](t T, ch CHAN, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotBlockedTf) | formatted variant | +| [`require.(*Assertions).NotBlockedT[E any, CHAN ~chan E](ch CHAN)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotBlockedTf[E any, CHAN ~chan E](ch CHAN, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotBlockedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/equality.md b/docs/doc-site/api/equality.md index 00a1e25ee..9be570b92 100644 --- a/docs/doc-site/api/equality.md +++ b/docs/doc-site/api/equality.md @@ -174,15 +174,15 @@ func main() { | [`assert.Empty(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Empty) | package-level function | | [`assert.Emptyf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Emptyf) | formatted variant | | [`assert.(*Assertions).Empty(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Empty) | method variant | -| [`assert.(*Assertions).Emptyf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Emptyf) | method formatted variant | +| [`assert.(*Assertions).Emptyf(object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Emptyf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Empty(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Empty) | package-level function | -| [`require.Emptyf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Emptyf) | formatted variant | -| [`require.(*Assertions).Empty(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Empty) | method variant | -| [`require.(*Assertions).Emptyf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Emptyf) | method formatted variant | +| [`require.Empty(t T, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Empty) | package-level function | +| [`require.Emptyf(t T, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Emptyf) | formatted variant | +| [`require.(*Assertions).Empty(object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Empty) | method variant | +| [`require.(*Assertions).Emptyf(object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Emptyf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -290,15 +290,15 @@ func main() { | [`assert.Equal(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Equal) | package-level function | | [`assert.Equalf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Equalf) | formatted variant | | [`assert.(*Assertions).Equal(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Equal) | method variant | -| [`assert.(*Assertions).Equalf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Equalf) | method formatted variant | +| [`assert.(*Assertions).Equalf(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Equalf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Equal(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Equal) | package-level function | -| [`require.Equalf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Equalf) | formatted variant | -| [`require.(*Assertions).Equal(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Equal) | method variant | -| [`require.(*Assertions).Equalf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Equalf) | method formatted variant | +| [`require.Equal(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Equal) | package-level function | +| [`require.Equalf(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Equalf) | formatted variant | +| [`require.(*Assertions).Equal(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Equal) | method variant | +| [`require.(*Assertions).Equalf(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Equalf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -421,15 +421,15 @@ type dummyStruct struct { | [`assert.EqualExportedValues(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualExportedValues) | package-level function | | [`assert.EqualExportedValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualExportedValuesf) | formatted variant | | [`assert.(*Assertions).EqualExportedValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualExportedValues) | method variant | -| [`assert.(*Assertions).EqualExportedValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualExportedValuesf) | method formatted variant | +| [`assert.(*Assertions).EqualExportedValuesf(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualExportedValuesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.EqualExportedValues(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualExportedValues) | package-level function | -| [`require.EqualExportedValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualExportedValuesf) | formatted variant | -| [`require.(*Assertions).EqualExportedValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualExportedValues) | method variant | -| [`require.(*Assertions).EqualExportedValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualExportedValuesf) | method formatted variant | +| [`require.EqualExportedValues(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualExportedValues) | package-level function | +| [`require.EqualExportedValuesf(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualExportedValuesf) | formatted variant | +| [`require.(*Assertions).EqualExportedValues(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualExportedValues) | method variant | +| [`require.(*Assertions).EqualExportedValuesf(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualExportedValuesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -539,15 +539,15 @@ func main() { | [`assert.EqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualT) | package-level function | | [`assert.EqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualTf) | formatted variant | | [`assert.(*Assertions).EqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).EqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).EqualTf[V comparable](expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.EqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualT) | package-level function | -| [`require.EqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualTf) | formatted variant | -| [`require.(*Assertions).EqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).EqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.EqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualT) | package-level function | +| [`require.EqualTf[V comparable](t T, expected V, actual V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualTf) | formatted variant | +| [`require.(*Assertions).EqualT[V comparable](expected V, actual V)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).EqualTf[V comparable](expected V, actual V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -653,15 +653,15 @@ func main() { | [`assert.EqualValues(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualValues) | package-level function | | [`assert.EqualValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualValuesf) | formatted variant | | [`assert.(*Assertions).EqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualValues) | method variant | -| [`assert.(*Assertions).EqualValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualValuesf) | method formatted variant | +| [`assert.(*Assertions).EqualValuesf(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualValuesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.EqualValues(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualValues) | package-level function | -| [`require.EqualValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualValuesf) | formatted variant | -| [`require.(*Assertions).EqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualValues) | method variant | -| [`require.(*Assertions).EqualValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualValuesf) | method formatted variant | +| [`require.EqualValues(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualValues) | package-level function | +| [`require.EqualValuesf(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualValuesf) | formatted variant | +| [`require.(*Assertions).EqualValues(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualValues) | method variant | +| [`require.(*Assertions).EqualValuesf(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualValuesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -764,15 +764,15 @@ func main() { | [`assert.Exactly(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Exactly) | package-level function | | [`assert.Exactlyf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Exactlyf) | formatted variant | | [`assert.(*Assertions).Exactly(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Exactly) | method variant | -| [`assert.(*Assertions).Exactlyf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Exactlyf) | method formatted variant | +| [`assert.(*Assertions).Exactlyf(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Exactlyf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Exactly(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Exactly) | package-level function | -| [`require.Exactlyf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Exactlyf) | formatted variant | -| [`require.(*Assertions).Exactly(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Exactly) | method variant | -| [`require.(*Assertions).Exactlyf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Exactlyf) | method formatted variant | +| [`require.Exactly(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Exactly) | package-level function | +| [`require.Exactlyf(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Exactlyf) | formatted variant | +| [`require.(*Assertions).Exactly(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Exactly) | method variant | +| [`require.(*Assertions).Exactlyf(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Exactlyf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -875,15 +875,15 @@ func main() { | [`assert.Nil(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Nil) | package-level function | | [`assert.Nilf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Nilf) | formatted variant | | [`assert.(*Assertions).Nil(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Nil) | method variant | -| [`assert.(*Assertions).Nilf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Nilf) | method formatted variant | +| [`assert.(*Assertions).Nilf(object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Nilf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Nil(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Nil) | package-level function | -| [`require.Nilf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Nilf) | formatted variant | -| [`require.(*Assertions).Nil(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Nil) | method variant | -| [`require.(*Assertions).Nilf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Nilf) | method formatted variant | +| [`require.Nil(t T, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Nil) | package-level function | +| [`require.Nilf(t T, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Nilf) | formatted variant | +| [`require.(*Assertions).Nil(object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Nil) | method variant | +| [`require.(*Assertions).Nilf(object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Nilf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -988,15 +988,15 @@ func main() { | [`assert.NotEmpty(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEmpty) | package-level function | | [`assert.NotEmptyf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEmptyf) | formatted variant | | [`assert.(*Assertions).NotEmpty(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEmpty) | method variant | -| [`assert.(*Assertions).NotEmptyf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEmptyf) | method formatted variant | +| [`assert.(*Assertions).NotEmptyf(object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEmptyf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotEmpty(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEmpty) | package-level function | -| [`require.NotEmptyf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEmptyf) | formatted variant | -| [`require.(*Assertions).NotEmpty(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEmpty) | method variant | -| [`require.(*Assertions).NotEmptyf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEmptyf) | method formatted variant | +| [`require.NotEmpty(t T, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEmpty) | package-level function | +| [`require.NotEmptyf(t T, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEmptyf) | formatted variant | +| [`require.(*Assertions).NotEmpty(object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEmpty) | method variant | +| [`require.(*Assertions).NotEmptyf(object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEmptyf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1102,15 +1102,15 @@ func main() { | [`assert.NotEqual(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqual) | package-level function | | [`assert.NotEqualf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualf) | formatted variant | | [`assert.(*Assertions).NotEqual(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqual) | method variant | -| [`assert.(*Assertions).NotEqualf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualf) | method formatted variant | +| [`assert.(*Assertions).NotEqualf(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotEqual(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqual) | package-level function | -| [`require.NotEqualf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualf) | formatted variant | -| [`require.(*Assertions).NotEqual(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqual) | method variant | -| [`require.(*Assertions).NotEqualf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualf) | method formatted variant | +| [`require.NotEqual(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqual) | package-level function | +| [`require.NotEqualf(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualf) | formatted variant | +| [`require.(*Assertions).NotEqual(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqual) | method variant | +| [`require.(*Assertions).NotEqualf(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1215,15 +1215,15 @@ func main() { | [`assert.NotEqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualT) | package-level function | | [`assert.NotEqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualTf) | formatted variant | | [`assert.(*Assertions).NotEqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotEqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotEqualTf[V comparable](expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotEqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualT) | package-level function | -| [`require.NotEqualTf[V comparable](t T, expected V, actual V, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualTf) | formatted variant | -| [`require.(*Assertions).NotEqualT[V comparable](expected V, actual V) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotEqualTf[V comparable](expected V, actual V, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotEqualT[V comparable](t T, expected V, actual V, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualT) | package-level function | +| [`require.NotEqualTf[V comparable](t T, expected V, actual V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualTf) | formatted variant | +| [`require.(*Assertions).NotEqualT[V comparable](expected V, actual V)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotEqualTf[V comparable](expected V, actual V, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1328,15 +1328,15 @@ func main() { | [`assert.NotEqualValues(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualValues) | package-level function | | [`assert.NotEqualValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotEqualValuesf) | formatted variant | | [`assert.(*Assertions).NotEqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualValues) | method variant | -| [`assert.(*Assertions).NotEqualValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualValuesf) | method formatted variant | +| [`assert.(*Assertions).NotEqualValuesf(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotEqualValuesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotEqualValues(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualValues) | package-level function | -| [`require.NotEqualValuesf(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualValuesf) | formatted variant | -| [`require.(*Assertions).NotEqualValues(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualValues) | method variant | -| [`require.(*Assertions).NotEqualValuesf(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualValuesf) | method formatted variant | +| [`require.NotEqualValues(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualValues) | package-level function | +| [`require.NotEqualValuesf(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotEqualValuesf) | formatted variant | +| [`require.(*Assertions).NotEqualValues(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualValues) | method variant | +| [`require.(*Assertions).NotEqualValuesf(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotEqualValuesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1439,15 +1439,15 @@ func main() { | [`assert.NotNil(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotNil) | package-level function | | [`assert.NotNilf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotNilf) | formatted variant | | [`assert.(*Assertions).NotNil(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotNil) | method variant | -| [`assert.(*Assertions).NotNilf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotNilf) | method formatted variant | +| [`assert.(*Assertions).NotNilf(object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotNilf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotNil(t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotNil) | package-level function | -| [`require.NotNilf(t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotNilf) | formatted variant | -| [`require.(*Assertions).NotNil(object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotNil) | method variant | -| [`require.(*Assertions).NotNilf(object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotNilf) | method formatted variant | +| [`require.NotNil(t T, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotNil) | package-level function | +| [`require.NotNilf(t T, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotNilf) | formatted variant | +| [`require.(*Assertions).NotNil(object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotNil) | method variant | +| [`require.(*Assertions).NotNilf(object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotNilf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1570,15 +1570,15 @@ func ptr[T any](value T) *T { | [`assert.NotSame(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSame) | package-level function | | [`assert.NotSamef(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSamef) | formatted variant | | [`assert.(*Assertions).NotSame(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSame) | method variant | -| [`assert.(*Assertions).NotSamef(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSamef) | method formatted variant | +| [`assert.(*Assertions).NotSamef(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSamef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotSame(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSame) | package-level function | -| [`require.NotSamef(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSamef) | formatted variant | -| [`require.(*Assertions).NotSame(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSame) | method variant | -| [`require.(*Assertions).NotSamef(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSamef) | method formatted variant | +| [`require.NotSame(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSame) | package-level function | +| [`require.NotSamef(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSamef) | formatted variant | +| [`require.(*Assertions).NotSame(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSame) | method variant | +| [`require.(*Assertions).NotSamef(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSamef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1701,15 +1701,15 @@ func ptr[T any](value T) *T { | [`assert.NotSameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSameT) | package-level function | | [`assert.NotSameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSameTf) | formatted variant | | [`assert.(*Assertions).NotSameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSameT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotSameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSameTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotSameTf[P any](expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotSameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSameT) | package-level function | -| [`require.NotSameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSameTf) | formatted variant | -| [`require.(*Assertions).NotSameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSameT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotSameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSameTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotSameT[P any](t T, expected *P, actual *P, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSameT) | package-level function | +| [`require.NotSameTf[P any](t T, expected *P, actual *P, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSameTf) | formatted variant | +| [`require.(*Assertions).NotSameT[P any](expected *P, actual *P)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSameT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotSameTf[P any](expected *P, actual *P, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1830,15 +1830,15 @@ var ( | [`assert.Same(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Same) | package-level function | | [`assert.Samef(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Samef) | formatted variant | | [`assert.(*Assertions).Same(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Same) | method variant | -| [`assert.(*Assertions).Samef(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Samef) | method formatted variant | +| [`assert.(*Assertions).Samef(expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Samef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Same(t T, expected any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Same) | package-level function | -| [`require.Samef(t T, expected any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Samef) | formatted variant | -| [`require.(*Assertions).Same(expected any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Same) | method variant | -| [`require.(*Assertions).Samef(expected any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Samef) | method formatted variant | +| [`require.Same(t T, expected any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Same) | package-level function | +| [`require.Samef(t T, expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Samef) | formatted variant | +| [`require.(*Assertions).Same(expected any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Same) | method variant | +| [`require.(*Assertions).Samef(expected any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Samef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1955,15 +1955,15 @@ var ( | [`assert.SameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SameT) | package-level function | | [`assert.SameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SameTf) | formatted variant | | [`assert.(*Assertions).SameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SameT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SameTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SameTf[P any](expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SameT[P any](t T, expected *P, actual *P, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SameT) | package-level function | -| [`require.SameTf[P any](t T, expected *P, actual *P, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SameTf) | formatted variant | -| [`require.(*Assertions).SameT[P any](expected *P, actual *P) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SameT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SameTf[P any](expected *P, actual *P, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SameTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SameT[P any](t T, expected *P, actual *P, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SameT) | package-level function | +| [`require.SameTf[P any](t T, expected *P, actual *P, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SameTf) | formatted variant | +| [`require.(*Assertions).SameT[P any](expected *P, actual *P)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SameT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SameTf[P any](expected *P, actual *P, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SameTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/error.md b/docs/doc-site/api/error.md index dadad8e74..fdd2d9c76 100644 --- a/docs/doc-site/api/error.md +++ b/docs/doc-site/api/error.md @@ -149,15 +149,15 @@ func main() { | [`assert.EqualError(t T, err error, errString string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualError) | package-level function | | [`assert.EqualErrorf(t T, err error, errString string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualErrorf) | formatted variant | | [`assert.(*Assertions).EqualError(err error, errString string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualError) | method variant | -| [`assert.(*Assertions).EqualErrorf(err error, errString string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualErrorf) | method formatted variant | +| [`assert.(*Assertions).EqualErrorf(err error, errString string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.EqualErrorf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.EqualError(t T, err error, errString string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualError) | package-level function | -| [`require.EqualErrorf(t T, err error, errString string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualErrorf) | formatted variant | -| [`require.(*Assertions).EqualError(err error, errString string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualError) | method variant | -| [`require.(*Assertions).EqualErrorf(err error, errString string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualErrorf) | method formatted variant | +| [`require.EqualError(t T, err error, errString string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualError) | package-level function | +| [`require.EqualErrorf(t T, err error, errString string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#EqualErrorf) | formatted variant | +| [`require.(*Assertions).EqualError(err error, errString string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualError) | method variant | +| [`require.(*Assertions).EqualErrorf(err error, errString string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.EqualErrorf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -261,15 +261,15 @@ func main() { | [`assert.Error(t T, err error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Error) | package-level function | | [`assert.Errorf(t T, err error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Errorf) | formatted variant | | [`assert.(*Assertions).Error(err error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Error) | method variant | -| [`assert.(*Assertions).Errorf(err error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Errorf) | method formatted variant | +| [`assert.(*Assertions).Errorf(err error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Errorf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Error(t T, err error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Error) | package-level function | -| [`require.Errorf(t T, err error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Errorf) | formatted variant | -| [`require.(*Assertions).Error(err error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Error) | method variant | -| [`require.(*Assertions).Errorf(err error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Errorf) | method formatted variant | +| [`require.Error(t T, err error, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Error) | package-level function | +| [`require.Errorf(t T, err error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Errorf) | formatted variant | +| [`require.(*Assertions).Error(err error)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Error) | method variant | +| [`require.(*Assertions).Errorf(err error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Errorf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -388,15 +388,15 @@ func (d *dummyError) Error() string { | [`assert.ErrorAs(t T, err error, target any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorAs) | package-level function | | [`assert.ErrorAsf(t T, err error, target any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorAsf) | formatted variant | | [`assert.(*Assertions).ErrorAs(err error, target any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAs) | method variant | -| [`assert.(*Assertions).ErrorAsf(err error, target any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsf) | method formatted variant | +| [`assert.(*Assertions).ErrorAsf(err error, target any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.ErrorAs(t T, err error, target any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAs) | package-level function | -| [`require.ErrorAsf(t T, err error, target any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsf) | formatted variant | -| [`require.(*Assertions).ErrorAs(err error, target any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAs) | method variant | -| [`require.(*Assertions).ErrorAsf(err error, target any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsf) | method formatted variant | +| [`require.ErrorAs(t T, err error, target any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAs) | package-level function | +| [`require.ErrorAsf(t T, err error, target any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsf) | formatted variant | +| [`require.(*Assertions).ErrorAs(err error, target any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAs) | method variant | +| [`require.(*Assertions).ErrorAsf(err error, target any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -487,15 +487,15 @@ fmt.Println("passed") | [`assert.ErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorAsType) | package-level function | | [`assert.ErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorAsTypef) | formatted variant | | [`assert.(*Assertions).ErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsType) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).ErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).ErrorAsTypef[E error](err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.ErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsType) | package-level function | -| [`require.ErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsTypef) | formatted variant | -| [`require.(*Assertions).ErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsType) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).ErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.ErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsType) | package-level function | +| [`require.ErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorAsTypef) | formatted variant | +| [`require.(*Assertions).ErrorAsType[E error](err error, target *E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsType) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).ErrorAsTypef[E error](err error, target *E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -600,15 +600,15 @@ func main() { | [`assert.ErrorContains(t T, err error, contains string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorContains) | package-level function | | [`assert.ErrorContainsf(t T, err error, contains string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorContainsf) | formatted variant | | [`assert.(*Assertions).ErrorContains(err error, contains string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorContains) | method variant | -| [`assert.(*Assertions).ErrorContainsf(err error, contains string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorContainsf) | method formatted variant | +| [`assert.(*Assertions).ErrorContainsf(err error, contains string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorContainsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.ErrorContains(t T, err error, contains string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorContains) | package-level function | -| [`require.ErrorContainsf(t T, err error, contains string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorContainsf) | formatted variant | -| [`require.(*Assertions).ErrorContains(err error, contains string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorContains) | method variant | -| [`require.(*Assertions).ErrorContainsf(err error, contains string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorContainsf) | method formatted variant | +| [`require.ErrorContains(t T, err error, contains string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorContains) | package-level function | +| [`require.ErrorContainsf(t T, err error, contains string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorContainsf) | formatted variant | +| [`require.(*Assertions).ErrorContains(err error, contains string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorContains) | method variant | +| [`require.(*Assertions).ErrorContainsf(err error, contains string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorContainsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -715,15 +715,15 @@ func main() { | [`assert.ErrorIs(t T, err error, target error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorIs) | package-level function | | [`assert.ErrorIsf(t T, err error, target error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#ErrorIsf) | formatted variant | | [`assert.(*Assertions).ErrorIs(err error, target error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorIs) | method variant | -| [`assert.(*Assertions).ErrorIsf(err error, target error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorIsf) | method formatted variant | +| [`assert.(*Assertions).ErrorIsf(err error, target error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.ErrorIsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.ErrorIs(t T, err error, target error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorIs) | package-level function | -| [`require.ErrorIsf(t T, err error, target error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorIsf) | formatted variant | -| [`require.(*Assertions).ErrorIs(err error, target error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorIs) | method variant | -| [`require.(*Assertions).ErrorIsf(err error, target error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorIsf) | method formatted variant | +| [`require.ErrorIs(t T, err error, target error, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorIs) | package-level function | +| [`require.ErrorIsf(t T, err error, target error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#ErrorIsf) | formatted variant | +| [`require.(*Assertions).ErrorIs(err error, target error)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorIs) | method variant | +| [`require.(*Assertions).ErrorIsf(err error, target error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.ErrorIsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -829,15 +829,15 @@ func main() { | [`assert.NoError(t T, err error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NoError) | package-level function | | [`assert.NoErrorf(t T, err error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NoErrorf) | formatted variant | | [`assert.(*Assertions).NoError(err error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoError) | method variant | -| [`assert.(*Assertions).NoErrorf(err error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoErrorf) | method formatted variant | +| [`assert.(*Assertions).NoErrorf(err error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoErrorf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NoError(t T, err error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoError) | package-level function | -| [`require.NoErrorf(t T, err error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoErrorf) | formatted variant | -| [`require.(*Assertions).NoError(err error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoError) | method variant | -| [`require.(*Assertions).NoErrorf(err error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoErrorf) | method formatted variant | +| [`require.NoError(t T, err error, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoError) | package-level function | +| [`require.NoErrorf(t T, err error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoErrorf) | formatted variant | +| [`require.(*Assertions).NoError(err error)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoError) | method variant | +| [`require.(*Assertions).NoErrorf(err error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoErrorf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -955,15 +955,15 @@ func (d *dummyError) Error() string { | [`assert.NotErrorAs(t T, err error, target any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorAs) | package-level function | | [`assert.NotErrorAsf(t T, err error, target any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorAsf) | formatted variant | | [`assert.(*Assertions).NotErrorAs(err error, target any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAs) | method variant | -| [`assert.(*Assertions).NotErrorAsf(err error, target any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsf) | method formatted variant | +| [`assert.(*Assertions).NotErrorAsf(err error, target any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotErrorAs(t T, err error, target any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAs) | package-level function | -| [`require.NotErrorAsf(t T, err error, target any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsf) | formatted variant | -| [`require.(*Assertions).NotErrorAs(err error, target any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAs) | method variant | -| [`require.(*Assertions).NotErrorAsf(err error, target any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsf) | method formatted variant | +| [`require.NotErrorAs(t T, err error, target any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAs) | package-level function | +| [`require.NotErrorAsf(t T, err error, target any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsf) | formatted variant | +| [`require.(*Assertions).NotErrorAs(err error, target any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAs) | method variant | +| [`require.(*Assertions).NotErrorAsf(err error, target any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1050,15 +1050,15 @@ fmt.Println("passed") | [`assert.NotErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorAsType) | package-level function | | [`assert.NotErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorAsTypef) | formatted variant | | [`assert.(*Assertions).NotErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsType) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotErrorAsTypef[E error](err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsType) | package-level function | -| [`require.NotErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsTypef) | formatted variant | -| [`require.(*Assertions).NotErrorAsType[E error](err error, target *E) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsType) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotErrorAsTypef[E error](err error, target *E, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotErrorAsType[E error](t T, err error, target *E, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsType) | package-level function | +| [`require.NotErrorAsTypef[E error](t T, err error, target *E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorAsTypef) | formatted variant | +| [`require.(*Assertions).NotErrorAsType[E error](err error, target *E)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsType) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotErrorAsTypef[E error](err error, target *E, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorAsTypef) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1165,15 +1165,15 @@ func main() { | [`assert.NotErrorIs(t T, err error, target error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorIs) | package-level function | | [`assert.NotErrorIsf(t T, err error, target error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotErrorIsf) | formatted variant | | [`assert.(*Assertions).NotErrorIs(err error, target error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorIs) | method variant | -| [`assert.(*Assertions).NotErrorIsf(err error, target error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorIsf) | method formatted variant | +| [`assert.(*Assertions).NotErrorIsf(err error, target error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotErrorIsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotErrorIs(t T, err error, target error, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorIs) | package-level function | -| [`require.NotErrorIsf(t T, err error, target error, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorIsf) | formatted variant | -| [`require.(*Assertions).NotErrorIs(err error, target error) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorIs) | method variant | -| [`require.(*Assertions).NotErrorIsf(err error, target error, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorIsf) | method formatted variant | +| [`require.NotErrorIs(t T, err error, target error, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorIs) | package-level function | +| [`require.NotErrorIsf(t T, err error, target error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotErrorIsf) | formatted variant | +| [`require.(*Assertions).NotErrorIs(err error, target error)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorIs) | method variant | +| [`require.(*Assertions).NotErrorIsf(err error, target error, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotErrorIsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/file.md b/docs/doc-site/api/file.md index 8294a33c3..d8fe78b31 100644 --- a/docs/doc-site/api/file.md +++ b/docs/doc-site/api/file.md @@ -141,15 +141,15 @@ func testDataPath() string { | [`assert.DirExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#DirExists) | package-level function | | [`assert.DirExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#DirExistsf) | formatted variant | | [`assert.(*Assertions).DirExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.DirExists) | method variant | -| [`assert.(*Assertions).DirExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.DirExistsf) | method formatted variant | +| [`assert.(*Assertions).DirExistsf(path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.DirExistsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.DirExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirExists) | package-level function | -| [`require.DirExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirExistsf) | formatted variant | -| [`require.(*Assertions).DirExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirExists) | method variant | -| [`require.(*Assertions).DirExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirExistsf) | method formatted variant | +| [`require.DirExists(t T, path string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirExists) | package-level function | +| [`require.DirExistsf(t T, path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirExistsf) | formatted variant | +| [`require.(*Assertions).DirExists(path string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirExists) | method variant | +| [`require.(*Assertions).DirExistsf(path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirExistsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -263,15 +263,15 @@ func testDataPath() string { | [`assert.DirNotExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#DirNotExists) | package-level function | | [`assert.DirNotExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#DirNotExistsf) | formatted variant | | [`assert.(*Assertions).DirNotExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.DirNotExists) | method variant | -| [`assert.(*Assertions).DirNotExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.DirNotExistsf) | method formatted variant | +| [`assert.(*Assertions).DirNotExistsf(path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.DirNotExistsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.DirNotExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirNotExists) | package-level function | -| [`require.DirNotExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirNotExistsf) | formatted variant | -| [`require.(*Assertions).DirNotExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirNotExists) | method variant | -| [`require.(*Assertions).DirNotExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirNotExistsf) | method formatted variant | +| [`require.DirNotExists(t T, path string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirNotExists) | package-level function | +| [`require.DirNotExistsf(t T, path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#DirNotExistsf) | formatted variant | +| [`require.(*Assertions).DirNotExists(path string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirNotExists) | method variant | +| [`require.(*Assertions).DirNotExistsf(path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.DirNotExistsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -385,15 +385,15 @@ func testDataPath() string { | [`assert.FileEmpty(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileEmpty) | package-level function | | [`assert.FileEmptyf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileEmptyf) | formatted variant | | [`assert.(*Assertions).FileEmpty(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileEmpty) | method variant | -| [`assert.(*Assertions).FileEmptyf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileEmptyf) | method formatted variant | +| [`assert.(*Assertions).FileEmptyf(path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileEmptyf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.FileEmpty(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileEmpty) | package-level function | -| [`require.FileEmptyf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileEmptyf) | formatted variant | -| [`require.(*Assertions).FileEmpty(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileEmpty) | method variant | -| [`require.(*Assertions).FileEmptyf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileEmptyf) | method formatted variant | +| [`require.FileEmpty(t T, path string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileEmpty) | package-level function | +| [`require.FileEmptyf(t T, path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileEmptyf) | formatted variant | +| [`require.(*Assertions).FileEmpty(path string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileEmpty) | method variant | +| [`require.(*Assertions).FileEmptyf(path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileEmptyf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -507,15 +507,15 @@ func testDataPath() string { | [`assert.FileExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileExists) | package-level function | | [`assert.FileExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileExistsf) | formatted variant | | [`assert.(*Assertions).FileExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileExists) | method variant | -| [`assert.(*Assertions).FileExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileExistsf) | method formatted variant | +| [`assert.(*Assertions).FileExistsf(path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileExistsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.FileExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileExists) | package-level function | -| [`require.FileExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileExistsf) | formatted variant | -| [`require.(*Assertions).FileExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileExists) | method variant | -| [`require.(*Assertions).FileExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileExistsf) | method formatted variant | +| [`require.FileExists(t T, path string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileExists) | package-level function | +| [`require.FileExistsf(t T, path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileExistsf) | formatted variant | +| [`require.(*Assertions).FileExists(path string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileExists) | method variant | +| [`require.(*Assertions).FileExistsf(path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileExistsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -629,15 +629,15 @@ func testDataPath() string { | [`assert.FileNotEmpty(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileNotEmpty) | package-level function | | [`assert.FileNotEmptyf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileNotEmptyf) | formatted variant | | [`assert.(*Assertions).FileNotEmpty(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileNotEmpty) | method variant | -| [`assert.(*Assertions).FileNotEmptyf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileNotEmptyf) | method formatted variant | +| [`assert.(*Assertions).FileNotEmptyf(path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileNotEmptyf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.FileNotEmpty(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotEmpty) | package-level function | -| [`require.FileNotEmptyf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotEmptyf) | formatted variant | -| [`require.(*Assertions).FileNotEmpty(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotEmpty) | method variant | -| [`require.(*Assertions).FileNotEmptyf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotEmptyf) | method formatted variant | +| [`require.FileNotEmpty(t T, path string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotEmpty) | package-level function | +| [`require.FileNotEmptyf(t T, path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotEmptyf) | formatted variant | +| [`require.(*Assertions).FileNotEmpty(path string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotEmpty) | method variant | +| [`require.(*Assertions).FileNotEmptyf(path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotEmptyf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -751,15 +751,15 @@ func testDataPath() string { | [`assert.FileNotExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileNotExists) | package-level function | | [`assert.FileNotExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FileNotExistsf) | formatted variant | | [`assert.(*Assertions).FileNotExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileNotExists) | method variant | -| [`assert.(*Assertions).FileNotExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileNotExistsf) | method formatted variant | +| [`assert.(*Assertions).FileNotExistsf(path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FileNotExistsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.FileNotExists(t T, path string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotExists) | package-level function | -| [`require.FileNotExistsf(t T, path string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotExistsf) | formatted variant | -| [`require.(*Assertions).FileNotExists(path string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotExists) | method variant | -| [`require.(*Assertions).FileNotExistsf(path string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotExistsf) | method formatted variant | +| [`require.FileNotExists(t T, path string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotExists) | package-level function | +| [`require.FileNotExistsf(t T, path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FileNotExistsf) | formatted variant | +| [`require.(*Assertions).FileNotExists(path string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotExists) | method variant | +| [`require.(*Assertions).FileNotExistsf(path string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FileNotExistsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/http.md b/docs/doc-site/api/http.md index 3a9af61dd..9aea4b689 100644 --- a/docs/doc-site/api/http.md +++ b/docs/doc-site/api/http.md @@ -148,15 +148,15 @@ func httpBody(w http.ResponseWriter, r *http.Request) { | [`assert.HTTPBodyContains(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPBodyContains) | package-level function | | [`assert.HTTPBodyContainsf(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPBodyContainsf) | formatted variant | | [`assert.(*Assertions).HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyContains) | method variant | -| [`assert.(*Assertions).HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyContainsf) | method formatted variant | +| [`assert.(*Assertions).HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyContainsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.HTTPBodyContains(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyContains) | package-level function | -| [`require.HTTPBodyContainsf(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyContainsf) | formatted variant | -| [`require.(*Assertions).HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyContains) | method variant | -| [`require.(*Assertions).HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyContainsf) | method formatted variant | +| [`require.HTTPBodyContains(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyContains) | package-level function | +| [`require.HTTPBodyContainsf(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyContainsf) | formatted variant | +| [`require.(*Assertions).HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyContains) | method variant | +| [`require.(*Assertions).HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyContainsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -276,15 +276,15 @@ func httpBody(w http.ResponseWriter, r *http.Request) { | [`assert.HTTPBodyNotContains(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPBodyNotContains) | package-level function | | [`assert.HTTPBodyNotContainsf(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPBodyNotContainsf) | formatted variant | | [`assert.(*Assertions).HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyNotContains) | method variant | -| [`assert.(*Assertions).HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyNotContainsf) | method formatted variant | +| [`assert.(*Assertions).HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyNotContainsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.HTTPBodyNotContains(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyNotContains) | package-level function | -| [`require.HTTPBodyNotContainsf(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyNotContainsf) | formatted variant | -| [`require.(*Assertions).HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyNotContains) | method variant | -| [`require.(*Assertions).HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyNotContainsf) | method formatted variant | +| [`require.HTTPBodyNotContains(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyNotContains) | package-level function | +| [`require.HTTPBodyNotContainsf(t T, handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyNotContainsf) | formatted variant | +| [`require.(*Assertions).HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyNotContains) | method variant | +| [`require.(*Assertions).HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyNotContainsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -399,15 +399,15 @@ func httpError(w http.ResponseWriter, _ *http.Request) { | [`assert.HTTPError(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPError) | package-level function | | [`assert.HTTPErrorf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPErrorf) | formatted variant | | [`assert.(*Assertions).HTTPError(handler http.HandlerFunc, method string, url string, values url.Values) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPError) | method variant | -| [`assert.(*Assertions).HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPErrorf) | method formatted variant | +| [`assert.(*Assertions).HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPErrorf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.HTTPError(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPError) | package-level function | -| [`require.HTTPErrorf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPErrorf) | formatted variant | -| [`require.(*Assertions).HTTPError(handler http.HandlerFunc, method string, url string, values url.Values) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPError) | method variant | -| [`require.(*Assertions).HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPErrorf) | method formatted variant | +| [`require.HTTPError(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPError) | package-level function | +| [`require.HTTPErrorf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPErrorf) | formatted variant | +| [`require.(*Assertions).HTTPError(handler http.HandlerFunc, method string, url string, values url.Values)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPError) | method variant | +| [`require.(*Assertions).HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPErrorf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -522,15 +522,15 @@ func httpRedirect(w http.ResponseWriter, _ *http.Request) { | [`assert.HTTPRedirect(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPRedirect) | package-level function | | [`assert.HTTPRedirectf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPRedirectf) | formatted variant | | [`assert.(*Assertions).HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPRedirect) | method variant | -| [`assert.(*Assertions).HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPRedirectf) | method formatted variant | +| [`assert.(*Assertions).HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPRedirectf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.HTTPRedirect(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPRedirect) | package-level function | -| [`require.HTTPRedirectf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPRedirectf) | formatted variant | -| [`require.(*Assertions).HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPRedirect) | method variant | -| [`require.(*Assertions).HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPRedirectf) | method formatted variant | +| [`require.HTTPRedirect(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPRedirect) | package-level function | +| [`require.HTTPRedirectf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPRedirectf) | formatted variant | +| [`require.(*Assertions).HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPRedirect) | method variant | +| [`require.(*Assertions).HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPRedirectf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -645,15 +645,15 @@ func httpOK(w http.ResponseWriter, _ *http.Request) { | [`assert.HTTPStatusCode(t T, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPStatusCode) | package-level function | | [`assert.HTTPStatusCodef(t T, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPStatusCodef) | formatted variant | | [`assert.(*Assertions).HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPStatusCode) | method variant | -| [`assert.(*Assertions).HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPStatusCodef) | method formatted variant | +| [`assert.(*Assertions).HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPStatusCodef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.HTTPStatusCode(t T, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPStatusCode) | package-level function | -| [`require.HTTPStatusCodef(t T, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPStatusCodef) | formatted variant | -| [`require.(*Assertions).HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPStatusCode) | method variant | -| [`require.(*Assertions).HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPStatusCodef) | method formatted variant | +| [`require.HTTPStatusCode(t T, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPStatusCode) | package-level function | +| [`require.HTTPStatusCodef(t T, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPStatusCodef) | formatted variant | +| [`require.(*Assertions).HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPStatusCode) | method variant | +| [`require.(*Assertions).HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPStatusCodef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -768,15 +768,15 @@ func httpOK(w http.ResponseWriter, _ *http.Request) { | [`assert.HTTPSuccess(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPSuccess) | package-level function | | [`assert.HTTPSuccessf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPSuccessf) | formatted variant | | [`assert.(*Assertions).HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPSuccess) | method variant | -| [`assert.(*Assertions).HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPSuccessf) | method formatted variant | +| [`assert.(*Assertions).HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPSuccessf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.HTTPSuccess(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPSuccess) | package-level function | -| [`require.HTTPSuccessf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPSuccessf) | formatted variant | -| [`require.(*Assertions).HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPSuccess) | method variant | -| [`require.(*Assertions).HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPSuccessf) | method formatted variant | +| [`require.HTTPSuccess(t T, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPSuccess) | package-level function | +| [`require.HTTPSuccessf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPSuccessf) | formatted variant | +| [`require.(*Assertions).HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPSuccess) | method variant | +| [`require.(*Assertions).HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPSuccessf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -803,17 +803,11 @@ It returns the empty string if building a new request fails. | Signature | Usage | |--|--| | [`assert.HTTPBody(handler http.HandlerFunc, method string, url string, values url.Values) string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPBody) | package-level function | -| [`assert.HTTPBodyf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#HTTPBodyf) | formatted variant | -| [`assert.(*Assertions).HTTPBody(handler http.HandlerFunc, method string, url string, values url.Values) string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBody) | method variant | -| [`assert.(*Assertions).HTTPBodyf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.HTTPBodyf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| | [`require.HTTPBody(handler http.HandlerFunc, method string, url string, values url.Values) string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBody) | package-level function | -| [`require.HTTPBodyf(t T, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...any) string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#HTTPBodyf) | formatted variant | -| [`require.(*Assertions).HTTPBody(handler http.HandlerFunc, method string, url string, values url.Values) string`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBody) | method variant | -| [`require.(*Assertions).HTTPBodyf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.HTTPBodyf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/json.md b/docs/doc-site/api/json.md index 895b80454..4d5e456ac 100644 --- a/docs/doc-site/api/json.md +++ b/docs/doc-site/api/json.md @@ -135,15 +135,15 @@ func main() { | [`assert.JSONEq(t T, expected string, actual string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEq) | package-level function | | [`assert.JSONEqf(t T, expected string, actual string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqf) | formatted variant | | [`assert.(*Assertions).JSONEq(expected string, actual string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEq) | method variant | -| [`assert.(*Assertions).JSONEqf(expected string, actual string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqf) | method formatted variant | +| [`assert.(*Assertions).JSONEqf(expected string, actual string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.JSONEq(t T, expected string, actual string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEq) | package-level function | -| [`require.JSONEqf(t T, expected string, actual string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqf) | formatted variant | -| [`require.(*Assertions).JSONEq(expected string, actual string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEq) | method variant | -| [`require.(*Assertions).JSONEqf(expected string, actual string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqf) | method formatted variant | +| [`require.JSONEq(t T, expected string, actual string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEq) | package-level function | +| [`require.JSONEqf(t T, expected string, actual string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqf) | formatted variant | +| [`require.(*Assertions).JSONEq(expected string, actual string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEq) | method variant | +| [`require.(*Assertions).JSONEqf(expected string, actual string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -248,15 +248,15 @@ func main() { | [`assert.JSONEqBytes(t T, expected []byte, actual []byte, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqBytes) | package-level function | | [`assert.JSONEqBytesf(t T, expected []byte, actual []byte, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqBytesf) | formatted variant | | [`assert.(*Assertions).JSONEqBytes(expected []byte, actual []byte) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqBytes) | method variant | -| [`assert.(*Assertions).JSONEqBytesf(expected []byte, actual []byte, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqBytesf) | method formatted variant | +| [`assert.(*Assertions).JSONEqBytesf(expected []byte, actual []byte, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqBytesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.JSONEqBytes(t T, expected []byte, actual []byte, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqBytes) | package-level function | -| [`require.JSONEqBytesf(t T, expected []byte, actual []byte, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqBytesf) | formatted variant | -| [`require.(*Assertions).JSONEqBytes(expected []byte, actual []byte) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqBytes) | method variant | -| [`require.(*Assertions).JSONEqBytesf(expected []byte, actual []byte, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqBytesf) | method formatted variant | +| [`require.JSONEqBytes(t T, expected []byte, actual []byte, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqBytes) | package-level function | +| [`require.JSONEqBytesf(t T, expected []byte, actual []byte, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqBytesf) | formatted variant | +| [`require.(*Assertions).JSONEqBytes(expected []byte, actual []byte)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqBytes) | method variant | +| [`require.(*Assertions).JSONEqBytesf(expected []byte, actual []byte, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqBytesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -373,15 +373,15 @@ func main() { | [`assert.JSONEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqT) | package-level function | | [`assert.JSONEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONEqTf) | formatted variant | | [`assert.(*Assertions).JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.JSONEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqT) | package-level function | -| [`require.JSONEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqTf) | formatted variant | -| [`require.(*Assertions).JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.JSONEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqT) | package-level function | +| [`require.JSONEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONEqTf) | formatted variant | +| [`require.(*Assertions).JSONEqT[EDoc, ADoc RText](expected EDoc, actual ADoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).JSONEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -506,15 +506,15 @@ type dummyStruct struct { | [`assert.JSONMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONMarshalAsT) | package-level function | | [`assert.JSONMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONMarshalAsTf) | formatted variant | | [`assert.(*Assertions).JSONMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONMarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.JSONMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONMarshalAsT) | package-level function | -| [`require.JSONMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONMarshalAsTf) | formatted variant | -| [`require.(*Assertions).JSONMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONMarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.JSONMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONMarshalAsT) | package-level function | +| [`require.JSONMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONMarshalAsTf) | formatted variant | +| [`require.(*Assertions).JSONMarshalAsT[EDoc RText](expected EDoc, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONMarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).JSONMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -641,15 +641,15 @@ type dummyStruct struct { | [`assert.JSONUnmarshalAsT[Object any, ADoc RText](t T, expected Object, jazon ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONUnmarshalAsT) | package-level function | | [`assert.JSONUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, jazon ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#JSONUnmarshalAsTf) | formatted variant | | [`assert.(*Assertions).JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.JSONUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.JSONUnmarshalAsT[Object any, ADoc RText](t T, expected Object, jazon ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONUnmarshalAsT) | package-level function | -| [`require.JSONUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, jazon ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONUnmarshalAsTf) | formatted variant | -| [`require.(*Assertions).JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.JSONUnmarshalAsT[Object any, ADoc RText](t T, expected Object, jazon ADoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONUnmarshalAsT) | package-level function | +| [`require.JSONUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, jazon ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#JSONUnmarshalAsTf) | formatted variant | +| [`require.(*Assertions).JSONUnmarshalAsT[Object any, ADoc RText](expected Object, jazon ADoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).JSONUnmarshalAsTf[Object any, ADoc RText](expected Object, jazon ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.JSONUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/number.md b/docs/doc-site/api/number.md index d761e99e7..aef3e2f03 100644 --- a/docs/doc-site/api/number.md +++ b/docs/doc-site/api/number.md @@ -155,15 +155,15 @@ func main() { | [`assert.InDelta(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDelta) | package-level function | | [`assert.InDeltaf(t T, expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaf) | formatted variant | | [`assert.(*Assertions).InDelta(expected any, actual any, delta float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDelta) | method variant | -| [`assert.(*Assertions).InDeltaf(expected any, actual any, delta float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaf) | method formatted variant | +| [`assert.(*Assertions).InDeltaf(expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InDelta(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDelta) | package-level function | -| [`require.InDeltaf(t T, expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaf) | formatted variant | -| [`require.(*Assertions).InDelta(expected any, actual any, delta float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDelta) | method variant | -| [`require.(*Assertions).InDeltaf(expected any, actual any, delta float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaf) | method formatted variant | +| [`require.InDelta(t T, expected any, actual any, delta float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDelta) | package-level function | +| [`require.InDeltaf(t T, expected any, actual any, delta float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaf) | formatted variant | +| [`require.(*Assertions).InDelta(expected any, actual any, delta float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDelta) | method variant | +| [`require.(*Assertions).InDeltaf(expected any, actual any, delta float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -268,15 +268,15 @@ func main() { | [`assert.InDeltaMapValues(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaMapValues) | package-level function | | [`assert.InDeltaMapValuesf(t T, expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaMapValuesf) | formatted variant | | [`assert.(*Assertions).InDeltaMapValues(expected any, actual any, delta float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaMapValues) | method variant | -| [`assert.(*Assertions).InDeltaMapValuesf(expected any, actual any, delta float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaMapValuesf) | method formatted variant | +| [`assert.(*Assertions).InDeltaMapValuesf(expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaMapValuesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InDeltaMapValues(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaMapValues) | package-level function | -| [`require.InDeltaMapValuesf(t T, expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaMapValuesf) | formatted variant | -| [`require.(*Assertions).InDeltaMapValues(expected any, actual any, delta float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaMapValues) | method variant | -| [`require.(*Assertions).InDeltaMapValuesf(expected any, actual any, delta float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaMapValuesf) | method formatted variant | +| [`require.InDeltaMapValues(t T, expected any, actual any, delta float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaMapValues) | package-level function | +| [`require.InDeltaMapValuesf(t T, expected any, actual any, delta float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaMapValuesf) | formatted variant | +| [`require.(*Assertions).InDeltaMapValues(expected any, actual any, delta float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaMapValues) | method variant | +| [`require.(*Assertions).InDeltaMapValuesf(expected any, actual any, delta float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaMapValuesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -383,15 +383,15 @@ func main() { | [`assert.InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaSlice) | package-level function | | [`assert.InDeltaSlicef(t T, expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaSlicef) | formatted variant | | [`assert.(*Assertions).InDeltaSlice(expected any, actual any, delta float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaSlice) | method variant | -| [`assert.(*Assertions).InDeltaSlicef(expected any, actual any, delta float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaSlicef) | method formatted variant | +| [`assert.(*Assertions).InDeltaSlicef(expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaSlicef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaSlice) | package-level function | -| [`require.InDeltaSlicef(t T, expected any, actual any, delta float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaSlicef) | formatted variant | -| [`require.(*Assertions).InDeltaSlice(expected any, actual any, delta float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaSlice) | method variant | -| [`require.(*Assertions).InDeltaSlicef(expected any, actual any, delta float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaSlicef) | method formatted variant | +| [`require.InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaSlice) | package-level function | +| [`require.InDeltaSlicef(t T, expected any, actual any, delta float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaSlicef) | formatted variant | +| [`require.(*Assertions).InDeltaSlice(expected any, actual any, delta float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaSlice) | method variant | +| [`require.(*Assertions).InDeltaSlicef(expected any, actual any, delta float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaSlicef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -506,15 +506,15 @@ func main() { | [`assert.InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Number, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaT) | package-level function | | [`assert.InDeltaTf[Number Measurable](t T, expected Number, actual Number, delta Number, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaTf) | formatted variant | | [`assert.(*Assertions).InDeltaT[Number Measurable](expected Number, actual Number, delta Number) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InDeltaTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Number, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaT) | package-level function | -| [`require.InDeltaTf[Number Measurable](t T, expected Number, actual Number, delta Number, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaTf) | formatted variant | -| [`require.(*Assertions).InDeltaT[Number Measurable](expected Number, actual Number, delta Number) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Number, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaT) | package-level function | +| [`require.InDeltaTf[Number Measurable](t T, expected Number, actual Number, delta Number, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InDeltaTf) | formatted variant | +| [`require.(*Assertions).InDeltaT[Number Measurable](expected Number, actual Number, delta Number)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).InDeltaTf[Number Measurable](expected Number, actual Number, delta Number, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InDeltaTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -632,15 +632,15 @@ func main() { | [`assert.InEpsilon(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilon) | package-level function | | [`assert.InEpsilonf(t T, expected any, actual any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonf) | formatted variant | | [`assert.(*Assertions).InEpsilon(expected any, actual any, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilon) | method variant | -| [`assert.(*Assertions).InEpsilonf(expected any, actual any, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonf) | method formatted variant | +| [`assert.(*Assertions).InEpsilonf(expected any, actual any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InEpsilon(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilon) | package-level function | -| [`require.InEpsilonf(t T, expected any, actual any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonf) | formatted variant | -| [`require.(*Assertions).InEpsilon(expected any, actual any, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilon) | method variant | -| [`require.(*Assertions).InEpsilonf(expected any, actual any, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonf) | method formatted variant | +| [`require.InEpsilon(t T, expected any, actual any, epsilon float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilon) | package-level function | +| [`require.InEpsilonf(t T, expected any, actual any, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonf) | formatted variant | +| [`require.(*Assertions).InEpsilon(expected any, actual any, epsilon float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilon) | method variant | +| [`require.(*Assertions).InEpsilonf(expected any, actual any, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -745,15 +745,15 @@ func main() { | [`assert.InEpsilonSlice(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSlice) | package-level function | | [`assert.InEpsilonSlicef(t T, expected any, actual any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSlicef) | formatted variant | | [`assert.(*Assertions).InEpsilonSlice(expected any, actual any, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSlice) | method variant | -| [`assert.(*Assertions).InEpsilonSlicef(expected any, actual any, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSlicef) | method formatted variant | +| [`assert.(*Assertions).InEpsilonSlicef(expected any, actual any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSlicef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InEpsilonSlice(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSlice) | package-level function | -| [`require.InEpsilonSlicef(t T, expected any, actual any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSlicef) | formatted variant | -| [`require.(*Assertions).InEpsilonSlice(expected any, actual any, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSlice) | method variant | -| [`require.(*Assertions).InEpsilonSlicef(expected any, actual any, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSlicef) | method formatted variant | +| [`require.InEpsilonSlice(t T, expected any, actual any, epsilon float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSlice) | package-level function | +| [`require.InEpsilonSlicef(t T, expected any, actual any, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSlicef) | formatted variant | +| [`require.(*Assertions).InEpsilonSlice(expected any, actual any, epsilon float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSlice) | method variant | +| [`require.(*Assertions).InEpsilonSlicef(expected any, actual any, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSlicef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -875,15 +875,15 @@ func main() { | [`assert.InEpsilonSymmetric(t T, x any, y any, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSymmetric) | package-level function | | [`assert.InEpsilonSymmetricf(t T, x any, y any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSymmetricf) | formatted variant | | [`assert.(*Assertions).InEpsilonSymmetric(x any, y any, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetric) | method variant | -| [`assert.(*Assertions).InEpsilonSymmetricf(x any, y any, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricf) | method formatted variant | +| [`assert.(*Assertions).InEpsilonSymmetricf(x any, y any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InEpsilonSymmetric(t T, x any, y any, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetric) | package-level function | -| [`require.InEpsilonSymmetricf(t T, x any, y any, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricf) | formatted variant | -| [`require.(*Assertions).InEpsilonSymmetric(x any, y any, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetric) | method variant | -| [`require.(*Assertions).InEpsilonSymmetricf(x any, y any, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricf) | method formatted variant | +| [`require.InEpsilonSymmetric(t T, x any, y any, epsilon float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetric) | package-level function | +| [`require.InEpsilonSymmetricf(t T, x any, y any, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricf) | formatted variant | +| [`require.(*Assertions).InEpsilonSymmetric(x any, y any, epsilon float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetric) | method variant | +| [`require.(*Assertions).InEpsilonSymmetricf(x any, y any, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -988,15 +988,15 @@ func main() { | [`assert.InEpsilonSymmetricT[Number Measurable](t T, x Number, y Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSymmetricT) | package-level function | | [`assert.InEpsilonSymmetricTf[Number Measurable](t T, x Number, y Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonSymmetricTf) | formatted variant | | [`assert.(*Assertions).InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonSymmetricTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InEpsilonSymmetricT[Number Measurable](t T, x Number, y Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricT) | package-level function | -| [`require.InEpsilonSymmetricTf[Number Measurable](t T, x Number, y Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricTf) | formatted variant | -| [`require.(*Assertions).InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.InEpsilonSymmetricT[Number Measurable](t T, x Number, y Number, epsilon float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricT) | package-level function | +| [`require.InEpsilonSymmetricTf[Number Measurable](t T, x Number, y Number, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonSymmetricTf) | formatted variant | +| [`require.(*Assertions).InEpsilonSymmetricT[Number Measurable](x Number, y Number, epsilon float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).InEpsilonSymmetricTf[Number Measurable](x Number, y Number, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonSymmetricTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1120,15 +1120,15 @@ func main() { | [`assert.InEpsilonT[Number Measurable](t T, expected Number, actual Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonT) | package-level function | | [`assert.InEpsilonTf[Number Measurable](t T, expected Number, actual Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonTf) | formatted variant | | [`assert.(*Assertions).InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.InEpsilonTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.InEpsilonT[Number Measurable](t T, expected Number, actual Number, epsilon float64, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonT) | package-level function | -| [`require.InEpsilonTf[Number Measurable](t T, expected Number, actual Number, epsilon float64, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonTf) | formatted variant | -| [`require.(*Assertions).InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.InEpsilonT[Number Measurable](t T, expected Number, actual Number, epsilon float64, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonT) | package-level function | +| [`require.InEpsilonTf[Number Measurable](t T, expected Number, actual Number, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#InEpsilonTf) | formatted variant | +| [`require.(*Assertions).InEpsilonT[Number Measurable](expected Number, actual Number, epsilon float64)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).InEpsilonTf[Number Measurable](expected Number, actual Number, epsilon float64, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.InEpsilonTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/ordering.md b/docs/doc-site/api/ordering.md index cd27f4dca..a3e8488c5 100644 --- a/docs/doc-site/api/ordering.md +++ b/docs/doc-site/api/ordering.md @@ -148,15 +148,15 @@ func main() { | [`assert.IsDecreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsDecreasing) | package-level function | | [`assert.IsDecreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsDecreasingf) | formatted variant | | [`assert.(*Assertions).IsDecreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasing) | method variant | -| [`assert.(*Assertions).IsDecreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingf) | method formatted variant | +| [`assert.(*Assertions).IsDecreasingf(collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsDecreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasing) | package-level function | -| [`require.IsDecreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingf) | formatted variant | -| [`require.(*Assertions).IsDecreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasing) | method variant | -| [`require.(*Assertions).IsDecreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingf) | method formatted variant | +| [`require.IsDecreasing(t T, collection any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasing) | package-level function | +| [`require.IsDecreasingf(t T, collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingf) | formatted variant | +| [`require.(*Assertions).IsDecreasing(collection any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasing) | method variant | +| [`require.(*Assertions).IsDecreasingf(collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -261,15 +261,15 @@ func main() { | [`assert.IsDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsDecreasingT) | package-level function | | [`assert.IsDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsDecreasingTf) | formatted variant | | [`assert.(*Assertions).IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingT) | package-level function | -| [`require.IsDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingTf) | formatted variant | -| [`require.(*Assertions).IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.IsDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingT) | package-level function | +| [`require.IsDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsDecreasingTf) | formatted variant | +| [`require.(*Assertions).IsDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -374,15 +374,15 @@ func main() { | [`assert.IsIncreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsIncreasing) | package-level function | | [`assert.IsIncreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsIncreasingf) | formatted variant | | [`assert.(*Assertions).IsIncreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasing) | method variant | -| [`assert.(*Assertions).IsIncreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingf) | method formatted variant | +| [`assert.(*Assertions).IsIncreasingf(collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsIncreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasing) | package-level function | -| [`require.IsIncreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingf) | formatted variant | -| [`require.(*Assertions).IsIncreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasing) | method variant | -| [`require.(*Assertions).IsIncreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingf) | method formatted variant | +| [`require.IsIncreasing(t T, collection any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasing) | package-level function | +| [`require.IsIncreasingf(t T, collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingf) | formatted variant | +| [`require.(*Assertions).IsIncreasing(collection any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasing) | method variant | +| [`require.(*Assertions).IsIncreasingf(collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -487,15 +487,15 @@ func main() { | [`assert.IsIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsIncreasingT) | package-level function | | [`assert.IsIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsIncreasingTf) | formatted variant | | [`assert.(*Assertions).IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingT) | package-level function | -| [`require.IsIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingTf) | formatted variant | -| [`require.(*Assertions).IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.IsIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingT) | package-level function | +| [`require.IsIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsIncreasingTf) | formatted variant | +| [`require.(*Assertions).IsIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -606,15 +606,15 @@ func main() { | [`assert.IsNonDecreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonDecreasing) | package-level function | | [`assert.IsNonDecreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonDecreasingf) | formatted variant | | [`assert.(*Assertions).IsNonDecreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasing) | method variant | -| [`assert.(*Assertions).IsNonDecreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingf) | method formatted variant | +| [`assert.(*Assertions).IsNonDecreasingf(collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsNonDecreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasing) | package-level function | -| [`require.IsNonDecreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingf) | formatted variant | -| [`require.(*Assertions).IsNonDecreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasing) | method variant | -| [`require.(*Assertions).IsNonDecreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingf) | method formatted variant | +| [`require.IsNonDecreasing(t T, collection any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasing) | package-level function | +| [`require.IsNonDecreasingf(t T, collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingf) | formatted variant | +| [`require.(*Assertions).IsNonDecreasing(collection any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasing) | method variant | +| [`require.(*Assertions).IsNonDecreasingf(collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -725,15 +725,15 @@ func main() { | [`assert.IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonDecreasingT) | package-level function | | [`assert.IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonDecreasingTf) | formatted variant | | [`assert.(*Assertions).IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingT) | package-level function | -| [`require.IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingTf) | formatted variant | -| [`require.(*Assertions).IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingT) | package-level function | +| [`require.IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonDecreasingTf) | formatted variant | +| [`require.(*Assertions).IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsNonDecreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonDecreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -844,15 +844,15 @@ func main() { | [`assert.IsNonIncreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonIncreasing) | package-level function | | [`assert.IsNonIncreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonIncreasingf) | formatted variant | | [`assert.(*Assertions).IsNonIncreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasing) | method variant | -| [`assert.(*Assertions).IsNonIncreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingf) | method formatted variant | +| [`assert.(*Assertions).IsNonIncreasingf(collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsNonIncreasing(t T, collection any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasing) | package-level function | -| [`require.IsNonIncreasingf(t T, collection any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingf) | formatted variant | -| [`require.(*Assertions).IsNonIncreasing(collection any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasing) | method variant | -| [`require.(*Assertions).IsNonIncreasingf(collection any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingf) | method formatted variant | +| [`require.IsNonIncreasing(t T, collection any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasing) | package-level function | +| [`require.IsNonIncreasingf(t T, collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingf) | formatted variant | +| [`require.(*Assertions).IsNonIncreasing(collection any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasing) | method variant | +| [`require.(*Assertions).IsNonIncreasingf(collection any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -963,15 +963,15 @@ func main() { | [`assert.IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonIncreasingT) | package-level function | | [`assert.IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNonIncreasingTf) | formatted variant | | [`assert.(*Assertions).IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNonIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingT) | package-level function | -| [`require.IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingTf) | formatted variant | -| [`require.(*Assertions).IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingT) | package-level function | +| [`require.IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNonIncreasingTf) | formatted variant | +| [`require.(*Assertions).IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsNonIncreasingTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNonIncreasingTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1078,15 +1078,15 @@ func main() { | [`assert.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSortedT) | package-level function | | [`assert.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotSortedTf) | formatted variant | | [`assert.(*Assertions).NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSortedT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSortedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotSortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSortedT) | package-level function | -| [`require.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSortedTf) | formatted variant | -| [`require.(*Assertions).NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSortedT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSortedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSortedT) | package-level function | +| [`require.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotSortedTf) | formatted variant | +| [`require.(*Assertions).NotSortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSortedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotSortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotSortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1193,15 +1193,15 @@ func main() { | [`assert.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SortedT) | package-level function | | [`assert.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SortedTf) | formatted variant | | [`assert.(*Assertions).SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SortedT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SortedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.SortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SortedT) | package-level function | -| [`require.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SortedTf) | formatted variant | -| [`require.(*Assertions).SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SortedT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SortedTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SortedT) | package-level function | +| [`require.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#SortedTf) | formatted variant | +| [`require.(*Assertions).SortedT[OrderedSlice ~[]E, E Ordered](collection OrderedSlice)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SortedT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).SortedTf[OrderedSlice ~[]E, E Ordered](collection OrderedSlice, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.SortedTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/panic.md b/docs/doc-site/api/panic.md index 5557b3bfc..9282c9dc5 100644 --- a/docs/doc-site/api/panic.md +++ b/docs/doc-site/api/panic.md @@ -126,15 +126,15 @@ func main() { | [`assert.NotPanics(t T, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotPanics) | package-level function | | [`assert.NotPanicsf(t T, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotPanicsf) | formatted variant | | [`assert.(*Assertions).NotPanics(f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotPanics) | method variant | -| [`assert.(*Assertions).NotPanicsf(f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotPanicsf) | method formatted variant | +| [`assert.(*Assertions).NotPanicsf(f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotPanicsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotPanics(t T, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotPanics) | package-level function | -| [`require.NotPanicsf(t T, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotPanicsf) | formatted variant | -| [`require.(*Assertions).NotPanics(f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotPanics) | method variant | -| [`require.(*Assertions).NotPanicsf(f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotPanicsf) | method formatted variant | +| [`require.NotPanics(t T, f func(), msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotPanics) | package-level function | +| [`require.NotPanicsf(t T, f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotPanicsf) | formatted variant | +| [`require.(*Assertions).NotPanics(f func())`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotPanics) | method variant | +| [`require.(*Assertions).NotPanicsf(f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotPanicsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -241,15 +241,15 @@ func main() { | [`assert.Panics(t T, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Panics) | package-level function | | [`assert.Panicsf(t T, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Panicsf) | formatted variant | | [`assert.(*Assertions).Panics(f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Panics) | method variant | -| [`assert.(*Assertions).Panicsf(f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Panicsf) | method formatted variant | +| [`assert.(*Assertions).Panicsf(f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Panicsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Panics(t T, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Panics) | package-level function | -| [`require.Panicsf(t T, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Panicsf) | formatted variant | -| [`require.(*Assertions).Panics(f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Panics) | method variant | -| [`require.(*Assertions).Panicsf(f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Panicsf) | method formatted variant | +| [`require.Panics(t T, f func(), msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Panics) | package-level function | +| [`require.Panicsf(t T, f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Panicsf) | formatted variant | +| [`require.(*Assertions).Panics(f func())`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Panics) | method variant | +| [`require.(*Assertions).Panicsf(f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Panicsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -358,15 +358,15 @@ func main() { | [`assert.PanicsWithError(t T, errString string, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PanicsWithError) | package-level function | | [`assert.PanicsWithErrorf(t T, errString string, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PanicsWithErrorf) | formatted variant | | [`assert.(*Assertions).PanicsWithError(errString string, f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PanicsWithError) | method variant | -| [`assert.(*Assertions).PanicsWithErrorf(errString string, f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PanicsWithErrorf) | method formatted variant | +| [`assert.(*Assertions).PanicsWithErrorf(errString string, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PanicsWithErrorf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.PanicsWithError(t T, errString string, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithError) | package-level function | -| [`require.PanicsWithErrorf(t T, errString string, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithErrorf) | formatted variant | -| [`require.(*Assertions).PanicsWithError(errString string, f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithError) | method variant | -| [`require.(*Assertions).PanicsWithErrorf(errString string, f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithErrorf) | method formatted variant | +| [`require.PanicsWithError(t T, errString string, f func(), msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithError) | package-level function | +| [`require.PanicsWithErrorf(t T, errString string, f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithErrorf) | formatted variant | +| [`require.(*Assertions).PanicsWithError(errString string, f func())`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithError) | method variant | +| [`require.(*Assertions).PanicsWithErrorf(errString string, f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithErrorf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -474,15 +474,15 @@ func main() { | [`assert.PanicsWithValue(t T, expected any, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PanicsWithValue) | package-level function | | [`assert.PanicsWithValuef(t T, expected any, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#PanicsWithValuef) | formatted variant | | [`assert.(*Assertions).PanicsWithValue(expected any, f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PanicsWithValue) | method variant | -| [`assert.(*Assertions).PanicsWithValuef(expected any, f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PanicsWithValuef) | method formatted variant | +| [`assert.(*Assertions).PanicsWithValuef(expected any, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.PanicsWithValuef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.PanicsWithValue(t T, expected any, f func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithValue) | package-level function | -| [`require.PanicsWithValuef(t T, expected any, f func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithValuef) | formatted variant | -| [`require.(*Assertions).PanicsWithValue(expected any, f func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithValue) | method variant | -| [`require.(*Assertions).PanicsWithValuef(expected any, f func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithValuef) | method formatted variant | +| [`require.PanicsWithValue(t T, expected any, f func(), msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithValue) | package-level function | +| [`require.PanicsWithValuef(t T, expected any, f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#PanicsWithValuef) | formatted variant | +| [`require.(*Assertions).PanicsWithValue(expected any, f func())`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithValue) | method variant | +| [`require.(*Assertions).PanicsWithValuef(expected any, f func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.PanicsWithValuef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/safety.md b/docs/doc-site/api/safety.md index 8ace37c05..cc31e2c71 100644 --- a/docs/doc-site/api/safety.md +++ b/docs/doc-site/api/safety.md @@ -159,15 +159,15 @@ func main() { | [`assert.NoFileDescriptorLeak(t T, tested func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NoFileDescriptorLeak) | package-level function | | [`assert.NoFileDescriptorLeakf(t T, tested func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NoFileDescriptorLeakf) | formatted variant | | [`assert.(*Assertions).NoFileDescriptorLeak(tested func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoFileDescriptorLeak) | method variant | -| [`assert.(*Assertions).NoFileDescriptorLeakf(tested func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoFileDescriptorLeakf) | method formatted variant | +| [`assert.(*Assertions).NoFileDescriptorLeakf(tested func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoFileDescriptorLeakf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NoFileDescriptorLeak(t T, tested func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoFileDescriptorLeak) | package-level function | -| [`require.NoFileDescriptorLeakf(t T, tested func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoFileDescriptorLeakf) | formatted variant | -| [`require.(*Assertions).NoFileDescriptorLeak(tested func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoFileDescriptorLeak) | method variant | -| [`require.(*Assertions).NoFileDescriptorLeakf(tested func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoFileDescriptorLeakf) | method formatted variant | +| [`require.NoFileDescriptorLeak(t T, tested func(), msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoFileDescriptorLeak) | package-level function | +| [`require.NoFileDescriptorLeakf(t T, tested func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoFileDescriptorLeakf) | formatted variant | +| [`require.(*Assertions).NoFileDescriptorLeak(tested func())`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoFileDescriptorLeak) | method variant | +| [`require.(*Assertions).NoFileDescriptorLeakf(tested func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoFileDescriptorLeakf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -414,15 +414,15 @@ func (m *mockFailNowT) Failed() bool { | [`assert.NoGoRoutineLeak(t T, tested func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NoGoRoutineLeak) | package-level function | | [`assert.NoGoRoutineLeakf(t T, tested func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NoGoRoutineLeakf) | formatted variant | | [`assert.(*Assertions).NoGoRoutineLeak(tested func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoGoRoutineLeak) | method variant | -| [`assert.(*Assertions).NoGoRoutineLeakf(tested func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoGoRoutineLeakf) | method formatted variant | +| [`assert.(*Assertions).NoGoRoutineLeakf(tested func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NoGoRoutineLeakf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NoGoRoutineLeak(t T, tested func(), msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoGoRoutineLeak) | package-level function | -| [`require.NoGoRoutineLeakf(t T, tested func(), msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoGoRoutineLeakf) | formatted variant | -| [`require.(*Assertions).NoGoRoutineLeak(tested func()) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoGoRoutineLeak) | method variant | -| [`require.(*Assertions).NoGoRoutineLeakf(tested func(), msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoGoRoutineLeakf) | method formatted variant | +| [`require.NoGoRoutineLeak(t T, tested func(), msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoGoRoutineLeak) | package-level function | +| [`require.NoGoRoutineLeakf(t T, tested func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NoGoRoutineLeakf) | formatted variant | +| [`require.(*Assertions).NoGoRoutineLeak(tested func())`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoGoRoutineLeak) | method variant | +| [`require.(*Assertions).NoGoRoutineLeakf(tested func(), msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NoGoRoutineLeakf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/string.md b/docs/doc-site/api/string.md index ac434236a..9f0e6b7d5 100644 --- a/docs/doc-site/api/string.md +++ b/docs/doc-site/api/string.md @@ -131,15 +131,15 @@ func main() { | [`assert.NotRegexp(t T, rx any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotRegexp) | package-level function | | [`assert.NotRegexpf(t T, rx any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotRegexpf) | formatted variant | | [`assert.(*Assertions).NotRegexp(rx any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexp) | method variant | -| [`assert.(*Assertions).NotRegexpf(rx any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpf) | method formatted variant | +| [`assert.(*Assertions).NotRegexpf(rx any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotRegexp(t T, rx any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexp) | package-level function | -| [`require.NotRegexpf(t T, rx any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpf) | formatted variant | -| [`require.(*Assertions).NotRegexp(rx any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexp) | method variant | -| [`require.(*Assertions).NotRegexpf(rx any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpf) | method formatted variant | +| [`require.NotRegexp(t T, rx any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexp) | package-level function | +| [`require.NotRegexpf(t T, rx any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpf) | formatted variant | +| [`require.(*Assertions).NotRegexp(rx any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexp) | method variant | +| [`require.(*Assertions).NotRegexpf(rx any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -245,15 +245,15 @@ func main() { | [`assert.NotRegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotRegexpT) | package-level function | | [`assert.NotRegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotRegexpTf) | formatted variant | | [`assert.(*Assertions).NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotRegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotRegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpT) | package-level function | -| [`require.NotRegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpTf) | formatted variant | -| [`require.(*Assertions).NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.NotRegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpT) | package-level function | +| [`require.NotRegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotRegexpTf) | formatted variant | +| [`require.(*Assertions).NotRegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).NotRegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotRegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -361,15 +361,15 @@ func main() { | [`assert.Regexp(t T, rx any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Regexp) | package-level function | | [`assert.Regexpf(t T, rx any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Regexpf) | formatted variant | | [`assert.(*Assertions).Regexp(rx any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Regexp) | method variant | -| [`assert.(*Assertions).Regexpf(rx any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Regexpf) | method formatted variant | +| [`assert.(*Assertions).Regexpf(rx any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Regexpf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Regexp(t T, rx any, actual any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Regexp) | package-level function | -| [`require.Regexpf(t T, rx any, actual any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Regexpf) | formatted variant | -| [`require.(*Assertions).Regexp(rx any, actual any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Regexp) | method variant | -| [`require.(*Assertions).Regexpf(rx any, actual any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Regexpf) | method formatted variant | +| [`require.Regexp(t T, rx any, actual any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Regexp) | package-level function | +| [`require.Regexpf(t T, rx any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Regexpf) | formatted variant | +| [`require.(*Assertions).Regexp(rx any, actual any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Regexp) | method variant | +| [`require.(*Assertions).Regexpf(rx any, actual any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Regexpf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -471,15 +471,15 @@ func main() { | [`assert.RegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#RegexpT) | package-level function | | [`assert.RegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#RegexpTf) | formatted variant | | [`assert.(*Assertions).RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.RegexpT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.RegexpTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.RegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.RegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#RegexpT) | package-level function | -| [`require.RegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#RegexpTf) | formatted variant | -| [`require.(*Assertions).RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.RegexpT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.RegexpTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.RegexpT[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#RegexpT) | package-level function | +| [`require.RegexpTf[Rex RegExp, ADoc Text](t T, rx Rex, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#RegexpTf) | formatted variant | +| [`require.(*Assertions).RegexpT[Rex RegExp, ADoc Text](rx Rex, actual ADoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.RegexpT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).RegexpTf[Rex RegExp, ADoc Text](rx Rex, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.RegexpTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/testing.md b/docs/doc-site/api/testing.md index d9b87e831..5e6eb2501 100644 --- a/docs/doc-site/api/testing.md +++ b/docs/doc-site/api/testing.md @@ -53,15 +53,15 @@ Fail reports a failure through. | [`assert.Fail(t T, failureMessage string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Fail) | package-level function | | [`assert.Failf(t T, failureMessage string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Failf) | formatted variant | | [`assert.(*Assertions).Fail(failureMessage string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Fail) | method variant | -| [`assert.(*Assertions).Failf(failureMessage string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Failf) | method formatted variant | +| [`assert.(*Assertions).Failf(failureMessage string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Failf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Fail(t T, failureMessage string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Fail) | package-level function | -| [`require.Failf(t T, failureMessage string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Failf) | formatted variant | -| [`require.(*Assertions).Fail(failureMessage string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Fail) | method variant | -| [`require.(*Assertions).Failf(failureMessage string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Failf) | method formatted variant | +| [`require.Fail(t T, failureMessage string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Fail) | package-level function | +| [`require.Failf(t T, failureMessage string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Failf) | formatted variant | +| [`require.(*Assertions).Fail(failureMessage string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Fail) | method variant | +| [`require.(*Assertions).Failf(failureMessage string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Failf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -99,15 +99,15 @@ FailNow fails test. | [`assert.FailNow(t T, failureMessage string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FailNow) | package-level function | | [`assert.FailNowf(t T, failureMessage string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#FailNowf) | formatted variant | | [`assert.(*Assertions).FailNow(failureMessage string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FailNow) | method variant | -| [`assert.(*Assertions).FailNowf(failureMessage string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FailNowf) | method formatted variant | +| [`assert.(*Assertions).FailNowf(failureMessage string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.FailNowf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.FailNow(t T, failureMessage string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FailNow) | package-level function | -| [`require.FailNowf(t T, failureMessage string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FailNowf) | formatted variant | -| [`require.(*Assertions).FailNow(failureMessage string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FailNow) | method variant | -| [`require.(*Assertions).FailNowf(failureMessage string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FailNowf) | method formatted variant | +| [`require.FailNow(t T, failureMessage string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FailNow) | package-level function | +| [`require.FailNowf(t T, failureMessage string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#FailNowf) | formatted variant | +| [`require.(*Assertions).FailNow(failureMessage string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FailNow) | method variant | +| [`require.(*Assertions).FailNowf(failureMessage string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.FailNowf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/time.md b/docs/doc-site/api/time.md index cce117c3a..79ccbd10c 100644 --- a/docs/doc-site/api/time.md +++ b/docs/doc-site/api/time.md @@ -120,15 +120,15 @@ func main() { | [`assert.WithinDuration(t T, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#WithinDuration) | package-level function | | [`assert.WithinDurationf(t T, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#WithinDurationf) | formatted variant | | [`assert.(*Assertions).WithinDuration(expected time.Time, actual time.Time, delta time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.WithinDuration) | method variant | -| [`assert.(*Assertions).WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.WithinDurationf) | method formatted variant | +| [`assert.(*Assertions).WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.WithinDurationf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.WithinDuration(t T, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinDuration) | package-level function | -| [`require.WithinDurationf(t T, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinDurationf) | formatted variant | -| [`require.(*Assertions).WithinDuration(expected time.Time, actual time.Time, delta time.Duration) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinDuration) | method variant | -| [`require.(*Assertions).WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinDurationf) | method formatted variant | +| [`require.WithinDuration(t T, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinDuration) | package-level function | +| [`require.WithinDurationf(t T, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinDurationf) | formatted variant | +| [`require.(*Assertions).WithinDuration(expected time.Time, actual time.Time, delta time.Duration)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinDuration) | method variant | +| [`require.(*Assertions).WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinDurationf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -233,15 +233,15 @@ func main() { | [`assert.WithinRange(t T, actual time.Time, start time.Time, end time.Time, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#WithinRange) | package-level function | | [`assert.WithinRangef(t T, actual time.Time, start time.Time, end time.Time, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#WithinRangef) | formatted variant | | [`assert.(*Assertions).WithinRange(actual time.Time, start time.Time, end time.Time) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.WithinRange) | method variant | -| [`assert.(*Assertions).WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.WithinRangef) | method formatted variant | +| [`assert.(*Assertions).WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.WithinRangef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.WithinRange(t T, actual time.Time, start time.Time, end time.Time, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinRange) | package-level function | -| [`require.WithinRangef(t T, actual time.Time, start time.Time, end time.Time, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinRangef) | formatted variant | -| [`require.(*Assertions).WithinRange(actual time.Time, start time.Time, end time.Time) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinRange) | method variant | -| [`require.(*Assertions).WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinRangef) | method formatted variant | +| [`require.WithinRange(t T, actual time.Time, start time.Time, end time.Time, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinRange) | package-level function | +| [`require.WithinRangef(t T, actual time.Time, start time.Time, end time.Time, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#WithinRangef) | formatted variant | +| [`require.(*Assertions).WithinRange(actual time.Time, start time.Time, end time.Time)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinRange) | method variant | +| [`require.(*Assertions).WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.WithinRangef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/type.md b/docs/doc-site/api/type.md index 6d0d1c0b3..24fe24693 100644 --- a/docs/doc-site/api/type.md +++ b/docs/doc-site/api/type.md @@ -172,15 +172,15 @@ func ptr[T any](value T) *T { | [`assert.Implements(t T, interfaceObject any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Implements) | package-level function | | [`assert.Implementsf(t T, interfaceObject any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Implementsf) | formatted variant | | [`assert.(*Assertions).Implements(interfaceObject any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Implements) | method variant | -| [`assert.(*Assertions).Implementsf(interfaceObject any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Implementsf) | method formatted variant | +| [`assert.(*Assertions).Implementsf(interfaceObject any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Implementsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Implements(t T, interfaceObject any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Implements) | package-level function | -| [`require.Implementsf(t T, interfaceObject any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Implementsf) | formatted variant | -| [`require.(*Assertions).Implements(interfaceObject any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Implements) | method variant | -| [`require.(*Assertions).Implementsf(interfaceObject any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Implementsf) | method formatted variant | +| [`require.Implements(t T, interfaceObject any, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Implements) | package-level function | +| [`require.Implementsf(t T, interfaceObject any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Implementsf) | formatted variant | +| [`require.(*Assertions).Implements(interfaceObject any, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Implements) | method variant | +| [`require.(*Assertions).Implementsf(interfaceObject any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Implementsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -287,15 +287,15 @@ type myType float64 | [`assert.IsNotOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNotOfTypeT) | package-level function | | [`assert.IsNotOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNotOfTypeTf) | formatted variant | | [`assert.(*Assertions).IsNotOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotOfTypeT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).IsNotOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsNotOfTypeTf[EType any](object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsNotOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotOfTypeT) | package-level function | -| [`require.IsNotOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotOfTypeTf) | formatted variant | -| [`require.(*Assertions).IsNotOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotOfTypeT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).IsNotOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.IsNotOfTypeT[EType any](t T, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotOfTypeT) | package-level function | +| [`require.IsNotOfTypeTf[EType any](t T, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotOfTypeTf) | formatted variant | +| [`require.(*Assertions).IsNotOfTypeT[EType any](object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotOfTypeT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsNotOfTypeTf[EType any](object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -398,15 +398,15 @@ func main() { | [`assert.IsNotType(t T, theType any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNotType) | package-level function | | [`assert.IsNotTypef(t T, theType any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsNotTypef) | formatted variant | | [`assert.(*Assertions).IsNotType(theType any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotType) | method variant | -| [`assert.(*Assertions).IsNotTypef(theType any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotTypef) | method formatted variant | +| [`assert.(*Assertions).IsNotTypef(theType any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsNotTypef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsNotType(t T, theType any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotType) | package-level function | -| [`require.IsNotTypef(t T, theType any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotTypef) | formatted variant | -| [`require.(*Assertions).IsNotType(theType any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotType) | method variant | -| [`require.(*Assertions).IsNotTypef(theType any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotTypef) | method formatted variant | +| [`require.IsNotType(t T, theType any, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotType) | package-level function | +| [`require.IsNotTypef(t T, theType any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsNotTypef) | formatted variant | +| [`require.(*Assertions).IsNotType(theType any, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotType) | method variant | +| [`require.(*Assertions).IsNotTypef(theType any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsNotTypef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -513,15 +513,15 @@ type myType float64 | [`assert.IsOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsOfTypeT) | package-level function | | [`assert.IsOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsOfTypeTf) | formatted variant | | [`assert.(*Assertions).IsOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsOfTypeT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).IsOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).IsOfTypeTf[EType any](object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsOfTypeT[EType any](t T, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsOfTypeT) | package-level function | -| [`require.IsOfTypeTf[EType any](t T, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsOfTypeTf) | formatted variant | -| [`require.(*Assertions).IsOfTypeT[EType any](object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsOfTypeT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).IsOfTypeTf[EType any](object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.IsOfTypeT[EType any](t T, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsOfTypeT) | package-level function | +| [`require.IsOfTypeTf[EType any](t T, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsOfTypeTf) | formatted variant | +| [`require.(*Assertions).IsOfTypeT[EType any](object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsOfTypeT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).IsOfTypeTf[EType any](object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsOfTypeTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -624,15 +624,15 @@ func main() { | [`assert.IsType(t T, expectedType any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsType) | package-level function | | [`assert.IsTypef(t T, expectedType any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#IsTypef) | formatted variant | | [`assert.(*Assertions).IsType(expectedType any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsType) | method variant | -| [`assert.(*Assertions).IsTypef(expectedType any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsTypef) | method formatted variant | +| [`assert.(*Assertions).IsTypef(expectedType any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.IsTypef) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.IsType(t T, expectedType any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsType) | package-level function | -| [`require.IsTypef(t T, expectedType any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsTypef) | formatted variant | -| [`require.(*Assertions).IsType(expectedType any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsType) | method variant | -| [`require.(*Assertions).IsTypef(expectedType any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsTypef) | method formatted variant | +| [`require.IsType(t T, expectedType any, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsType) | package-level function | +| [`require.IsTypef(t T, expectedType any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#IsTypef) | formatted variant | +| [`require.(*Assertions).IsType(expectedType any, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsType) | method variant | +| [`require.(*Assertions).IsTypef(expectedType any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.IsTypef) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -740,15 +740,15 @@ func main() { | [`assert.Kind(t T, expectedKind reflect.Kind, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Kind) | package-level function | | [`assert.Kindf(t T, expectedKind reflect.Kind, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Kindf) | formatted variant | | [`assert.(*Assertions).Kind(expectedKind reflect.Kind, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Kind) | method variant | -| [`assert.(*Assertions).Kindf(expectedKind reflect.Kind, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Kindf) | method formatted variant | +| [`assert.(*Assertions).Kindf(expectedKind reflect.Kind, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Kindf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Kind(t T, expectedKind reflect.Kind, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Kind) | package-level function | -| [`require.Kindf(t T, expectedKind reflect.Kind, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Kindf) | formatted variant | -| [`require.(*Assertions).Kind(expectedKind reflect.Kind, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Kind) | method variant | -| [`require.(*Assertions).Kindf(expectedKind reflect.Kind, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Kindf) | method formatted variant | +| [`require.Kind(t T, expectedKind reflect.Kind, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Kind) | package-level function | +| [`require.Kindf(t T, expectedKind reflect.Kind, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Kindf) | formatted variant | +| [`require.(*Assertions).Kind(expectedKind reflect.Kind, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Kind) | method variant | +| [`require.(*Assertions).Kindf(expectedKind reflect.Kind, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Kindf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -851,15 +851,15 @@ func main() { | [`assert.NotImplements(t T, interfaceObject any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotImplements) | package-level function | | [`assert.NotImplementsf(t T, interfaceObject any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotImplementsf) | formatted variant | | [`assert.(*Assertions).NotImplements(interfaceObject any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotImplements) | method variant | -| [`assert.(*Assertions).NotImplementsf(interfaceObject any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotImplementsf) | method formatted variant | +| [`assert.(*Assertions).NotImplementsf(interfaceObject any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotImplementsf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotImplements(t T, interfaceObject any, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotImplements) | package-level function | -| [`require.NotImplementsf(t T, interfaceObject any, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotImplementsf) | formatted variant | -| [`require.(*Assertions).NotImplements(interfaceObject any, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotImplements) | method variant | -| [`require.(*Assertions).NotImplementsf(interfaceObject any, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotImplementsf) | method formatted variant | +| [`require.NotImplements(t T, interfaceObject any, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotImplements) | package-level function | +| [`require.NotImplementsf(t T, interfaceObject any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotImplementsf) | formatted variant | +| [`require.(*Assertions).NotImplements(interfaceObject any, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotImplements) | method variant | +| [`require.(*Assertions).NotImplementsf(interfaceObject any, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotImplementsf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -967,15 +967,15 @@ func main() { | [`assert.NotKind(t T, expectedKind reflect.Kind, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotKind) | package-level function | | [`assert.NotKindf(t T, expectedKind reflect.Kind, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotKindf) | formatted variant | | [`assert.(*Assertions).NotKind(expectedKind reflect.Kind, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotKind) | method variant | -| [`assert.(*Assertions).NotKindf(expectedKind reflect.Kind, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotKindf) | method formatted variant | +| [`assert.(*Assertions).NotKindf(expectedKind reflect.Kind, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotKindf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotKind(t T, expectedKind reflect.Kind, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotKind) | package-level function | -| [`require.NotKindf(t T, expectedKind reflect.Kind, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotKindf) | formatted variant | -| [`require.(*Assertions).NotKind(expectedKind reflect.Kind, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotKind) | method variant | -| [`require.(*Assertions).NotKindf(expectedKind reflect.Kind, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotKindf) | method formatted variant | +| [`require.NotKind(t T, expectedKind reflect.Kind, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotKind) | package-level function | +| [`require.NotKindf(t T, expectedKind reflect.Kind, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotKindf) | formatted variant | +| [`require.(*Assertions).NotKind(expectedKind reflect.Kind, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotKind) | method variant | +| [`require.(*Assertions).NotKindf(expectedKind reflect.Kind, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotKindf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1078,15 +1078,15 @@ func main() { | [`assert.NotZero(t T, i any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotZero) | package-level function | | [`assert.NotZerof(t T, i any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#NotZerof) | formatted variant | | [`assert.(*Assertions).NotZero(i any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotZero) | method variant | -| [`assert.(*Assertions).NotZerof(i any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotZerof) | method formatted variant | +| [`assert.(*Assertions).NotZerof(i any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.NotZerof) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.NotZero(t T, i any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotZero) | package-level function | -| [`require.NotZerof(t T, i any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotZerof) | formatted variant | -| [`require.(*Assertions).NotZero(i any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotZero) | method variant | -| [`require.(*Assertions).NotZerof(i any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotZerof) | method formatted variant | +| [`require.NotZero(t T, i any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotZero) | package-level function | +| [`require.NotZerof(t T, i any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#NotZerof) | formatted variant | +| [`require.(*Assertions).NotZero(i any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotZero) | method variant | +| [`require.(*Assertions).NotZerof(i any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.NotZerof) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -1189,15 +1189,15 @@ func main() { | [`assert.Zero(t T, i any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Zero) | package-level function | | [`assert.Zerof(t T, i any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Zerof) | formatted variant | | [`assert.(*Assertions).Zero(i any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Zero) | method variant | -| [`assert.(*Assertions).Zerof(i any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Zerof) | method formatted variant | +| [`assert.(*Assertions).Zerof(i any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.Zerof) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.Zero(t T, i any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Zero) | package-level function | -| [`require.Zerof(t T, i any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Zerof) | formatted variant | -| [`require.(*Assertions).Zero(i any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Zero) | method variant | -| [`require.(*Assertions).Zerof(i any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Zerof) | method formatted variant | +| [`require.Zero(t T, i any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Zero) | package-level function | +| [`require.Zerof(t T, i any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Zerof) | formatted variant | +| [`require.(*Assertions).Zero(i any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Zero) | method variant | +| [`require.(*Assertions).Zerof(i any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.Zerof) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} diff --git a/docs/doc-site/api/yaml.md b/docs/doc-site/api/yaml.md index 946d161c4..dd68c0038 100644 --- a/docs/doc-site/api/yaml.md +++ b/docs/doc-site/api/yaml.md @@ -64,15 +64,15 @@ See [YAMLEqBytes](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAM | [`assert.YAMLEq(t T, expected string, actual string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEq) | package-level function | | [`assert.YAMLEqf(t T, expected string, actual string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqf) | formatted variant | | [`assert.(*Assertions).YAMLEq(expected string, actual string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEq) | method variant | -| [`assert.(*Assertions).YAMLEqf(expected string, actual string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqf) | method formatted variant | +| [`assert.(*Assertions).YAMLEqf(expected string, actual string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.YAMLEq(t T, expected string, actual string, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEq) | package-level function | -| [`require.YAMLEqf(t T, expected string, actual string, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqf) | formatted variant | -| [`require.(*Assertions).YAMLEq(expected string, actual string) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEq) | method variant | -| [`require.(*Assertions).YAMLEqf(expected string, actual string, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqf) | method formatted variant | +| [`require.YAMLEq(t T, expected string, actual string, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEq) | package-level function | +| [`require.YAMLEqf(t T, expected string, actual string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqf) | formatted variant | +| [`require.(*Assertions).YAMLEq(expected string, actual string)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEq) | method variant | +| [`require.(*Assertions).YAMLEqf(expected string, actual string, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -135,15 +135,15 @@ For dynamic redaction of the input text via a callback, use [YAMLEqT](https://pk | [`assert.YAMLEqBytes(t T, expected []byte, actual []byte, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqBytes) | package-level function | | [`assert.YAMLEqBytesf(t T, expected []byte, actual []byte, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqBytesf) | formatted variant | | [`assert.(*Assertions).YAMLEqBytes(expected []byte, actual []byte) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqBytes) | method variant | -| [`assert.(*Assertions).YAMLEqBytesf(expected []byte, actual []byte, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqBytesf) | method formatted variant | +| [`assert.(*Assertions).YAMLEqBytesf(expected []byte, actual []byte, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqBytesf) | method formatted variant | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.YAMLEqBytes(t T, expected []byte, actual []byte, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqBytes) | package-level function | -| [`require.YAMLEqBytesf(t T, expected []byte, actual []byte, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqBytesf) | formatted variant | -| [`require.(*Assertions).YAMLEqBytes(expected []byte, actual []byte) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqBytes) | method variant | -| [`require.(*Assertions).YAMLEqBytesf(expected []byte, actual []byte, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqBytesf) | method formatted variant | +| [`require.YAMLEqBytes(t T, expected []byte, actual []byte, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqBytes) | package-level function | +| [`require.YAMLEqBytesf(t T, expected []byte, actual []byte, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqBytesf) | formatted variant | +| [`require.(*Assertions).YAMLEqBytes(expected []byte, actual []byte)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqBytes) | method variant | +| [`require.(*Assertions).YAMLEqBytesf(expected []byte, actual []byte, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqBytesf) | method formatted variant | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -183,15 +183,15 @@ NOTE: passed values (expected, actual) may be wrapped as functions to redact the | [`assert.YAMLEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqT) | package-level function | | [`assert.YAMLEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLEqTf) | formatted variant | | [`assert.(*Assertions).YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.YAMLEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqT) | package-level function | -| [`require.YAMLEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqTf) | formatted variant | -| [`require.(*Assertions).YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.YAMLEqT[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqT) | package-level function | +| [`require.YAMLEqTf[EDoc, ADoc RText](t T, expected EDoc, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLEqTf) | formatted variant | +| [`require.(*Assertions).YAMLEqT[EDoc, ADoc RText](expected EDoc, actual ADoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).YAMLEqTf[EDoc, ADoc RText](expected EDoc, actual ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLEqTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -242,15 +242,15 @@ NOTE: passed expected value may be wrapped as a function to redact the input tex | [`assert.YAMLMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLMarshalAsT) | package-level function | | [`assert.YAMLMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLMarshalAsTf) | formatted variant | | [`assert.(*Assertions).YAMLMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLMarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.YAMLMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLMarshalAsT) | package-level function | -| [`require.YAMLMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLMarshalAsTf) | formatted variant | -| [`require.(*Assertions).YAMLMarshalAsT[EDoc RText](expected EDoc, object any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLMarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.YAMLMarshalAsT[EDoc RText](t T, expected EDoc, object any, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLMarshalAsT) | package-level function | +| [`require.YAMLMarshalAsTf[EDoc RText](t T, expected EDoc, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLMarshalAsTf) | formatted variant | +| [`require.(*Assertions).YAMLMarshalAsT[EDoc RText](expected EDoc, object any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLMarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).YAMLMarshalAsTf[EDoc RText](expected EDoc, object any, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLMarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} @@ -303,15 +303,15 @@ NOTE: passed yamlDoc value may be wrapped as a function to redact the input text | [`assert.YAMLUnmarshalAsT[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLUnmarshalAsT) | package-level function | | [`assert.YAMLUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#YAMLUnmarshalAsTf) | formatted variant | | [`assert.(*Assertions).YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`assert.(*Assertions).YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`assert.(*Assertions).YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Assertions.YAMLUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="require" style="secondary" %}} | Signature | Usage | |--|--| -| [`require.YAMLUnmarshalAsT[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msgAndArgs ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLUnmarshalAsT) | package-level function | -| [`require.YAMLUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msg string, args ...any) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLUnmarshalAsTf) | formatted variant | -| [`require.(*Assertions).YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc) bool`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | -| [`require.(*Assertions).YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ..any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | +| [`require.YAMLUnmarshalAsT[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msgAndArgs ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLUnmarshalAsT) | package-level function | +| [`require.YAMLUnmarshalAsTf[Object any, ADoc RText](t T, expected Object, yamlDoc ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#YAMLUnmarshalAsTf) | formatted variant | +| [`require.(*Assertions).YAMLUnmarshalAsT[Object any, ADoc RText](expected Object, yamlDoc ADoc)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLUnmarshalAsT) | method variant {{% goversion "go1.27" %}} | +| [`require.(*Assertions).YAMLUnmarshalAsTf[Object any, ADoc RText](expected Object, yamlDoc ADoc, msg string, args ...any)`](https://pkg.go.dev/github.com/go-openapi/testify/v2/require#Assertions.YAMLUnmarshalAsTf) | method formatted variant {{% goversion "go1.27" %}} | {{% /tab %}} {{% tab title="internal" style="accent" icon="wrench" %}} From 7f32ae7639b09d820424b69490c50781a41cd13e Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Sun, 23 Aug 2026 18:22:25 +0200 Subject: [PATCH 3/3] test(codegen): don't run the generic-method tests before go1.27 x/tools/imports formats every file the generator writes with the go/parser of the toolchain running codegen. Before go1.27 that parser rejects a generic method with "method must have no type parameters", whatever //go:build line the generated file carries, so a run that emits the go1.27 forward files cannot complete and the oldstable CI leg failed on three tests. - forward_generics_test.go carries //go:build go1.27: every test in it drives the generator over a generic assertion; - TestExecute, which runs the whole pipeline over internal/assertions, skips when a probe parse of a generic method fails. The rest of main_test.go still runs, TestExecuteMultiplePackages included: it sets includeFwd and includeGen to false, so it emits no method at all. codegen already needed a toolchain recent enough to observe guarded source files; it now also needs one that can parse what it emits. The go.work floor records that, but GOTOOLCHAIN=local ignores a toolchain directive, which is how the oldstable leg reaches go1.26 in the first place. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Frederic BIDON --- .../generator/forward_generics_test.go | 7 ++++++ codegen/main_test.go | 22 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/codegen/internal/generator/forward_generics_test.go b/codegen/internal/generator/forward_generics_test.go index 88f4f1700..412c69496 100644 --- a/codegen/internal/generator/forward_generics_test.go +++ b/codegen/internal/generator/forward_generics_test.go @@ -1,6 +1,13 @@ // SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers // SPDX-License-Identifier: Apache-2.0 +// These tests make the generator emit generic methods, which x/tools/imports formats with +// the go/parser of the toolchain running the test. Before go1.27 that parser rejects them +// ("method must have no type parameters"), whatever //go:build line the generated file +// carries, so the tests only build on go1.27 and later. + +//go:build go1.27 + package generator import ( diff --git a/codegen/main_test.go b/codegen/main_test.go index f50cc2f87..443a0bd86 100644 --- a/codegen/main_test.go +++ b/codegen/main_test.go @@ -4,6 +4,8 @@ package main import ( + "go/parser" + "go/token" "iter" "os" "os/exec" @@ -12,6 +14,22 @@ import ( "testing" ) +// canParseGenericMethods reports whether the toolchain running this test accepts type +// parameters on methods. +// +// codegen emits generic assertions as methods into the go1.27 forward files, and +// x/tools/imports formats every file it writes with the go/parser of the running +// toolchain. Before go1.27 that parser rejects a generic method with "method must have +// no type parameters", whatever //go:build line the generated file carries — so a full +// generation run only completes on go1.27 and later. +func canParseGenericMethods() bool { + const src = "package p\ntype t struct{}\nfunc (t) m[T any](T) {}\n" + + _, err := parser.ParseFile(token.NewFileSet(), "probe.go", src, parser.SkipObjectResolution) + + return err == nil +} + // TestExecute verifies the execute function works with valid configuration. func TestExecute(t *testing.T) { // Skip if we're in a short test run @@ -19,6 +37,10 @@ func TestExecute(t *testing.T) { t.Skip("Skipping integration test in short mode") } + if !canParseGenericMethods() { + t.Skip("Skipping full generation: this toolchain cannot parse the generic methods codegen emits") + } + tmpDir := t.TempDir() targetRoot := filepath.Join(tmpDir, "output")