package assert
import "go.mongodb.org/mongo-driver/internal/testutil/assert"
Index ¶
- func Equal(t testing.TB, first, second interface{}, msg string, args ...interface{})
- func False(t testing.TB, obj interface{}, msg string, args ...interface{})
- func Nil(t testing.TB, obj interface{}, msg string, args ...interface{})
- func NotEqual(t testing.TB, first, second interface{}, msg string, args ...interface{})
- func NotNil(t testing.TB, obj interface{}, msg string, args ...interface{})
- func RegisterOpts(t reflect.Type, opts ...cmp.Option)
- func Soon(t testing.TB, callback func(ctx context.Context), timeout time.Duration)
- func True(t testing.TB, obj interface{}, msg string, args ...interface{})
Functions ¶
func Equal ¶
Equal compares first and second for equality. The objects must be of the same type. If the objects are not equal, the test will be failed with an error message containing msg and args.
func False ¶
False asserts that the obj parameter is a boolean with value false.
func Nil ¶
Nil asserts that the obj parameter is nil.
func NotEqual ¶
NotEqual compares first and second for inequality. The objects must be of the same type.
func NotNil ¶
NotNil asserts that the obj parameter is not nil.
func RegisterOpts ¶
RegisterOpts registers go-cmp options for a type. These options will be used when comparing two objects for equality.
func Soon ¶
Soon runs the provided callback for a maximum of timeoutMS milliseconds. The provided callback should respect the passed-in context and cease execution when it has expired.
func True ¶
True asserts that the obj parameter is a boolean with value true.
Source Files ¶
assert.go
- Version
- v1.10.1-cloud
- Published
- Aug 3, 2022
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 6 minutes ago –
Tools for package owners.