Number
Asserting Numbers
Assertions
All links point to https://pkg.go.dev/github.com/go-openapi/testify/v2
This domain exposes 5 functionalities.
InDelta
InDelta asserts that the two numerals are within delta of each other.
| Signature | Usage |
|---|---|
assert.InDelta(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool | package-level function |
assert.InDeltaf(t T, expected any, actual any, delta float64, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).InDelta(expected any, actual any, delta float64) bool | method variant |
assert.(*Assertions).InDeltaf(expected any, actual any, delta float64, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
require.InDelta(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool | package-level function |
require.InDeltaf(t T, expected any, actual any, delta float64, msg string, args ...any) bool | formatted variant |
require.(*Assertions).InDelta(expected any, actual any, delta float64) bool | method variant |
require.(*Assertions).InDeltaf(expected any, actual any, delta float64, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.InDelta(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#InDelta
InDeltaMapValues
InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys.
| Signature | Usage |
|---|---|
assertions.InDeltaMapValues(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#InDeltaMapValues
InDeltaSlice
InDeltaSlice is the same as InDelta, except it compares two slices.
| Signature | Usage |
|---|---|
assert.InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool | package-level function |
assert.InDeltaSlicef(t T, expected any, actual any, delta float64, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).InDeltaSlice(expected any, actual any, delta float64) bool | method variant |
assert.(*Assertions).InDeltaSlicef(expected any, actual any, delta float64, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#InDeltaSlice
InEpsilon
InEpsilon asserts that expected and actual have a relative error less than epsilon.
| Signature | Usage |
|---|---|
assert.InEpsilon(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool | package-level function |
assert.InEpsilonf(t T, expected any, actual any, epsilon float64, msg string, args ...any) bool | formatted variant |
assert.(*Assertions).InEpsilon(expected any, actual any, epsilon float64) bool | method variant |
assert.(*Assertions).InEpsilonf(expected any, actual any, epsilon float64, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
require.InEpsilon(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool | package-level function |
require.InEpsilonf(t T, expected any, actual any, epsilon float64, msg string, args ...any) bool | formatted variant |
require.(*Assertions).InEpsilon(expected any, actual any, epsilon float64) bool | method variant |
require.(*Assertions).InEpsilonf(expected any, actual any, epsilon float64, msg string, args ..any) | method formatted variant |
| Signature | Usage |
|---|---|
assertions.InEpsilon(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#InEpsilon
InEpsilonSlice
InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
| Signature | Usage |
|---|---|
assertions.InEpsilonSlice(t T, expected any, actual any, epsilon float64, msgAndArgs ...any) bool | internal implementation |
Source: github.com/go-openapi/testify/v2/internal/assertions#InEpsilonSlice
Generated with github.com/go-openapi/testify/v2/codegen