package
1.17.3
Repository: https://github.com/mongodb/mongo-go-driver.git
Documentation: pkg.go.dev

# Functions

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.
Contains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.
Containsf asserts that the specified string, list(array, slice...) or map contains the specified substring or element.
DifferentAddressRanges asserts that two byte slices reference distinct memory address ranges, meaning they reference different underlying byte arrays.
ElementsMatch asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements.
ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements.
Equal asserts that two objects are equal.
EqualBSON asserts that the expected and actual BSON binary values are equal.
EqualError asserts that a function returned an error (i.e.
EqualErrorf asserts that a function returned an error (i.e.
Equalf asserts that two objects are equal.
EqualValues asserts that two objects are equal or convertible to the same types and equal.
EqualValuesf asserts that two objects are equal or convertible to the same types and equal.
Error asserts that a function returned an error (i.e.
ErrorContains asserts that a function returned an error (i.e.
ErrorContainsf asserts that a function returned an error (i.e.
Errorf asserts that a function returned an error (i.e.
ErrorIs asserts that at least one of the errors in err's chain matches target.
Eventually asserts that given condition will be met in waitFor time, periodically checking target function each tick.
Eventuallyf asserts that given condition will be met in waitFor time, periodically checking target function each tick.
Fail reports a failure through.
Failf reports a failure through.
FailNow fails test.
FailNowf fails test.
False asserts that the specified value is false.
Falsef asserts that the specified value is false.
GetContextDiffString is like WriteContextDiff but returns the diff as a string.
GetUnifiedDiffString is like WriteUnifiedDiff but returns the diff as a string.
Greater asserts that the first element is greater than the second assert.Greater(t, 2, 1) assert.Greater(t, float64(2), float64(1)) assert.Greater(t, "b", "a").
Greaterf asserts that the first element is greater than the second assert.Greaterf(t, 2, 1, "error message %s", "formatted") assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") assert.Greaterf(t, "b", "a", "error message %s", "formatted").
GreaterOrEqual asserts that the first element is greater than or equal to the second assert.GreaterOrEqual(t, 2, 1) assert.GreaterOrEqual(t, 2, 2) assert.GreaterOrEqual(t, "b", "a") assert.GreaterOrEqual(t, "b", "b").
GreaterOrEqualf asserts that the first element is greater than or equal to the second assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted").
InDelta asserts that the two numerals are within delta of each other.
InDeltaf asserts that the two numerals are within delta of each other.
IsType asserts that the specified objects are of the same type.
IsTypef asserts that the specified objects are of the same type.
Len asserts that the specified object has specific length.
Lenf asserts that the specified object has specific length.
Less asserts that the first element is less than the second assert.Less(t, 1, 2) assert.Less(t, float64(1), float64(2)) assert.Less(t, "a", "b").
Lessf asserts that the first element is less than the second assert.Lessf(t, 1, 2, "error message %s", "formatted") assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") assert.Lessf(t, "a", "b", "error message %s", "formatted").
LessOrEqual asserts that the first element is less than or equal to the second assert.LessOrEqual(t, 1, 2) assert.LessOrEqual(t, 2, 2) assert.LessOrEqual(t, "a", "b") assert.LessOrEqual(t, "b", "b").
LessOrEqualf asserts that the first element is less than or equal to the second assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted").
Negative asserts that the specified element is negative assert.Negative(t, -1) assert.Negative(t, -1.23).
Negativef asserts that the specified element is negative assert.Negativef(t, -1, "error message %s", "formatted") assert.Negativef(t, -1.23, "error message %s", "formatted").
No description provided by the author
No description provided by the author
Nil asserts that the specified object is nil.
Nilf asserts that the specified object is nil.
NoError asserts that a function returned no error (i.e.
NoErrorf asserts that a function returned no error (i.e.
NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.
NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.
NotEqual asserts that the specified values are NOT equal.
NotEqualf asserts that the specified values are NOT equal.
NotEqualValues asserts that two objects are not equal even when converted to the same type assert.NotEqualValues(t, obj1, obj2).
NotEqualValuesf asserts that two objects are not equal even when converted to the same type assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted").
NotNil asserts that the specified object is not nil.
NotNilf asserts that the specified object is not nil.
ObjectsAreEqual determines if two objects are considered equal.
ObjectsAreEqualValues gets whether two objects are equal, or if their values are equal.
Positive asserts that the specified element is positive assert.Positive(t, 1) assert.Positive(t, 1.23).
Positivef asserts that the specified element is positive assert.Positivef(t, 1, "error message %s", "formatted") assert.Positivef(t, 1.23, "error message %s", "formatted").
Soon runs the provided callback and fails the passed-in test if the callback does not complete within timeout.
SplitLines splits a string on "\n" while preserving them.
True asserts that the specified value is true.
Truef asserts that the specified value is true.
WithinDuration asserts that the two times are within duration delta of each other.
WithinDurationf asserts that the two times are within duration delta of each other.
WriteContextDiff compares two sequences of lines; generates the delta as a context diff.
WriteUnifiedDiff compares two sequences of lines; generates the delta as a unified diff.

# Structs

No description provided by the author
No description provided by the author
SequenceMatcher compares sequence of strings.
UnifiedDiff represents the unified diff parameters.

# Interfaces

TestingT is an interface wrapper around *testing.T.

# Type aliases

No description provided by the author
No description provided by the author