📖 2 min read (~ 300 words).

Common

Other Uncategorized Helpers

Assertions

GoDoc

All links point to https://pkg.go.dev/github.com/go-openapi/testify/v2

This domain exposes 4 functionalities.


Other helpers

CallerInfo

CallerInfo returns an array of strings containing the file and line number of each stack frame leading from the current test to the assert call that failed.

SignatureUsage
assert.CallerInfo() []stringpackage-level function
SignatureUsage
require.CallerInfo() []stringpackage-level function
SignatureUsage
assertions.CallerInfo() []stringinternal implementation

Source: github.com/go-openapi/testify/v2/internal/assertions#CallerInfo

Maintainer Note it is not necessary to export CallerInfo. This should remain an internal implementation detail.

New

New makes a new [Assertions] object for the specified [T].

SignatureUsage
assert.New(t T) *Assertionspackage-level function
SignatureUsage
require.New(t T) *Assertionspackage-level function

ObjectsAreEqual

ObjectsAreEqual determines if two objects are considered equal.

This function does no assertion of any kind.

ObjectsAreEqualValues

ObjectsAreEqualValues gets whether two objects are equal, or if their values are equal.


Generated with github.com/go-openapi/testify/v2/codegen