Retracted : Retract v1.11.0 through v1.11.2 because they contain a data race bug in
operation memory pooling that may cause undefined behavior when reading
raw BSON responses in error documents. Resolved by GODRIVER-2677.
The highest tagged major version is
v2 .
Discover Packages
go.mongodb.org/mongo-driver
internal
testutil
assert
package
Version:
v1.11.2
Opens a new window with list of versions in this module.
Published: Feb 13, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
Equal(t, first, second, msg, args)
False(t, obj, msg, args)
Nil(t, obj, msg, args)
NotEqual(t, first, second, msg, args)
NotNil(t, obj, msg, args)
RegisterOpts(t, opts)
Soon(t, callback, timeout)
True(t, obj, msg, args)
Types
Source Files
Documentation
Documentation
¶
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{})
func Equal(t testing .TB , first, second interface{}, msg string , args ...interface{})
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.
False asserts that the obj parameter is a boolean with value false.
Nil asserts that the obj parameter is nil.
func NotEqual(t testing .TB , first, second interface{}, msg string , args ...interface{})
NotEqual compares first and second for inequality. The objects must be of the same type.
func NotNil(t testing .TB , obj interface{}, msg string , args ...interface{})
NotNil asserts that the obj parameter is not nil.
RegisterOpts registers go-cmp options for a type. These options will be used when comparing two objects for equality.
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.
True asserts that the obj parameter is a boolean with value true.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.