Ordering
Asserting How Collections Are Ordered
Assertions
All links point to https://pkg.go.dev/github.com/go-openapi/testify/v2
This domain exposes 10 functionalities. Generic assertions are marked with a .
- IsDecreasing
- IsDecreasingT[OrderedSlice ~[]E, E Ordered]
- IsIncreasing
- IsIncreasingT[OrderedSlice ~[]E, E Ordered]
- IsNonDecreasing
- IsNonDecreasingT[OrderedSlice ~[]E, E Ordered]
- IsNonIncreasing
- IsNonIncreasingT[OrderedSlice ~[]E, E Ordered]
- NotSortedT[OrderedSlice ~[]E, E Ordered]
- SortedT[OrderedSlice ~[]E, E Ordered]
IsDecreasing
IsDecreasing asserts that the collection is strictly decreasing.
| Signature | Usage |
|---|---|
assert.IsDecreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
assert.IsDecreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).IsDecreasing(collection any) bool | method variant |
assert.(*Assertions).IsDecreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
require.IsDecreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
require.IsDecreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
require.(*Assertions).IsDecreasing(collection any) bool | method variant |
require.(*Assertions).IsDecreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.IsDecreasing(t T, collection any, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsDecreasing
IsDecreasingT[OrderedSlice ~[]E, E Ordered]
IsDecreasingT asserts that a slice of Ordered is strictly decreasing.
| Signature | Usage |
|---|---|
assertions.IsDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsDecreasingT
IsIncreasing
IsIncreasing asserts that the collection is strictly increasing.
| Signature | Usage |
|---|---|
assert.IsIncreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
assert.IsIncreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).IsIncreasing(collection any) bool | method variant |
assert.(*Assertions).IsIncreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
require.IsIncreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
require.IsIncreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
require.(*Assertions).IsIncreasing(collection any) bool | method variant |
require.(*Assertions).IsIncreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.IsIncreasing(t T, collection any, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsIncreasing
IsIncreasingT[OrderedSlice ~[]E, E Ordered]
IsIncreasingT asserts that a slice of Ordered is strictly increasing.
| Signature | Usage |
|---|---|
assertions.IsIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsIncreasingT
IsNonDecreasing
IsNonDecreasing asserts that the collection is not strictly decreasing.
| Signature | Usage |
|---|---|
assert.IsNonDecreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
assert.IsNonDecreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).IsNonDecreasing(collection any) bool | method variant |
assert.(*Assertions).IsNonDecreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
require.IsNonDecreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
require.IsNonDecreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
require.(*Assertions).IsNonDecreasing(collection any) bool | method variant |
require.(*Assertions).IsNonDecreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.IsNonDecreasing(t T, collection any, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsNonDecreasing
IsNonDecreasingT[OrderedSlice ~[]E, E Ordered]
IsNonDecreasingT asserts that a slice of Ordered is not decreasing.
| Signature | Usage |
|---|---|
assertions.IsNonDecreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsNonDecreasingT
IsNonIncreasing
IsNonIncreasing asserts that the collection is not increasing.
| Signature | Usage |
|---|---|
assert.IsNonIncreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
assert.IsNonIncreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).IsNonIncreasing(collection any) bool | method variant |
assert.(*Assertions).IsNonIncreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
require.IsNonIncreasing(t T, collection any, msgAndArgs ...any) bool | package-level function |
require.IsNonIncreasingf(t T, collection any, msg string, args ...any) bool | formatted variant |
require.(*Assertions).IsNonIncreasing(collection any) bool | method variant |
require.(*Assertions).IsNonIncreasingf(collection any, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.IsNonIncreasing(t T, collection any, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsNonIncreasing
IsNonIncreasingT[OrderedSlice ~[]E, E Ordered]
IsNonIncreasingT asserts that a slice of Ordered is NOT strictly increasing.
| Signature | Usage |
|---|---|
assertions.IsNonIncreasingT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#IsNonIncreasingT
NotSortedT[OrderedSlice ~[]E, E Ordered]
NotSortedT asserts that the slice of Ordered is NOT sorted (i.e. non-strictly increasing).
Unlike IsDecreasingT, it accepts slices that are neither increasing nor decreasing.
| Signature | Usage |
|---|---|
assert.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | package-level function |
assert.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool | formatted variant |
| Signature | Usage |
|---|---|
require.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | package-level function |
require.NotSortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool | formatted variant |
| Signature | Usage |
|---|---|
assertions.NotSortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#NotSortedT
SortedT[OrderedSlice ~[]E, E Ordered]
SortedT asserts that the slice of Ordered is sorted (i.e. non-strictly increasing).
Unlike IsIncreasingT, it accepts elements to be equal.
| Signature | Usage |
|---|---|
assert.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | package-level function |
assert.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool | formatted variant |
| Signature | Usage |
|---|---|
require.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | package-level function |
require.SortedTf[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msg string, args ...any) bool | formatted variant |
| Signature | Usage |
|---|---|
assertions.SortedT[OrderedSlice ~[]E, E Ordered](t T, collection OrderedSlice, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#SortedT
Generated with github.com/go-openapi/testify/codegen/v2