Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/stretchr/testify
/ functions
Functions
1,305 in github.com/stretchr/testify
⨍
Functions
1,305
◇
Types & classes
122
Method
PanicsWithValuef
PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value.
require/require_forward.go:1473
Method
Panicsf
Panicsf asserts that the code inside the specified PanicTestFunc panics. a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted")
assert/assertion_forward.go:1482
Method
Panicsf
Panicsf asserts that the code inside the specified PanicTestFunc panics. a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted")
require/require_forward.go:1483
Method
ParamsFormat
()
_codegen/main.go:276
Method
Positive
Positive asserts that the specified element is positive a.Positive(1) a.Positive(1.23)
assert/assertion_forward.go:1493
Method
Positive
Positive asserts that the specified element is positive a.Positive(1) a.Positive(1.23)
require/require_forward.go:1494
Method
Positivef
Positivef asserts that the specified element is positive a.Positivef(1, "error message %s", "formatted") a.Positivef(1.23, "error message %s", "for
assert/assertion_forward.go:1504
Method
Positivef
Positivef asserts that the specified element is positive a.Positivef(1, "error message %s", "formatted") a.Positivef(1.23, "error message %s", "for
require/require_forward.go:1505
Method
Qualifier
(p *types.Package)
_codegen/main.go:223
Method
Regexp
Regexp asserts that a specified regexp matches a string. a.Regexp(regexp.MustCompile("start"), "it's starting") a.Regexp("start...$", "it's not sta
require/require_forward.go:1516
Method
Regexpf
Regexpf asserts that a specified regexp matches a string. a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
assert/assertion_forward.go:1526
Method
Regexpf
Regexpf asserts that a specified regexp matches a string. a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
require/require_forward.go:1527
Method
Reset
Deprecated: That was a method for internal usage that should not have been published. Now just panics.
assert/assertions.go:1979
Method
RoundTrip
Deprecated: Use [net/http/httptest] instead.
http/test_round_tripper.go:15
Method
Run
Run provides suite functionality around golang subtests. It should be called in place of t.Run(name, func(t *testing.T)) in test suite code. The pass
suite/suite.go:98
Method
Run
Run sets a handler to be called before returning. It can be used when mocking a method (such as an unmarshaler) that takes a pointer to a struct and s
mock/mock.go:183
Method
Same
Same asserts that two pointers reference the same object. a.Same(ptr1, ptr2) Both arguments must be pointer variables. Pointer variable sameness is
assert/assertion_forward.go:1539
Method
Same
Same asserts that two pointers reference the same object. a.Same(ptr1, ptr2) Both arguments must be pointer variables. Pointer variable sameness is
require/require_forward.go:1540
Method
Samef
Samef asserts that two pointers reference the same object. a.Samef(ptr1, ptr2, "error message %s", "formatted") Both arguments must be pointer vari
assert/assertion_forward.go:1552
Method
Samef
Samef asserts that two pointers reference the same object. a.Samef(ptr1, ptr2, "error message %s", "formatted") Both arguments must be pointer vari
require/require_forward.go:1553
Method
SetS
SetS needs to set the current test suite as parent to get access to the parent methods
suite/suite.go:52
Method
SetupSubTest
()
suite/suite_test.go:268
Method
SetupSubTest
()
suite/suite_test.go:505
Method
SetupSuite
()
suite/suite_test.go:61
Method
SetupSuite
The SetupSuite method will be run by testify once, at the very start of the testing suite, before any tests are run.
suite/suite_test.go:180
Method
SetupSuite
()
suite/suite_test.go:282
Method
SetupSuite
()
suite/suite_test.go:386
Method
SetupSuite
()
suite/suite_test.go:489
Method
SetupSuite
()
suite/suite_test.go:658
Method
SetupTest
()
suite/suite_test.go:67
Method
SetupTest
The SetupTest method will be run before every test in the suite.
suite/suite_test.go:203
Method
SetupTest
()
suite/suite_test.go:497
Method
SetupTest
()
suite/suite_test.go:665
Method
String
String returns the string representation of FunctionalOptionsArgument
mock/mock.go:837
Method
String
()
mock/mock.go:891
Method
String
String gets the argument at the specified index. Panics if there is no argument, or if the argument is of the wrong type. If no index is provided, St
mock/mock.go:1075
Method
Subset
Subset asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. a.S
assert/assertion_forward.go:1564
Method
Subset
Subset asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. a.S
require/require_forward.go:1565
Method
Subsetf
Subsetf asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. a.
assert/assertion_forward.go:1576
Method
Subsetf
Subsetf asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. a.
require/require_forward.go:1577
Method
TearDownSubTest
()
suite/suite_test.go:263
Method
TearDownSubTest
()
suite/suite_test.go:509
Method
TearDownSubTest
()
suite/suite_test.go:698
Method
TearDownSuite
()
suite/suite_test.go:97
Method
TearDownSuite
The TearDownSuite method will be run by testify once, at the very end of the testing suite, after all tests have been run.
suite/suite_test.go:198
Method
TearDownSuite
()
suite/suite_test.go:293
Method
TearDownSuite
()
suite/suite_test.go:394
Method
TearDownSuite
()
suite/suite_test.go:493
Method
TearDownSuite
()
suite/suite_test.go:662
Method
TearDownSuite
()
suite/suite_test.go:690
Method
TearDownTest
()
suite/suite_test.go:91
Method
TearDownTest
The TearDownTest method will be run after every test in the suite.
suite/suite_test.go:208
Method
TearDownTest
()
suite/suite_test.go:501
Method
TearDownTest
()
suite/suite_test.go:669
Method
TearDownTest
()
suite/suite_test.go:694
Method
Test
()
suite/suite_test.go:79
Function
TestAfterTotalWaitTimeWhileExecution
(t *testing.T)
mock/mock_test.go:2061
Function
TestArgumentMatcherToPrintMismatch
(t *testing.T)
mock/mock_test.go:2085
Function
TestArgumentMatcherToPrintMismatchWithReferenceType
(t *testing.T)
mock/mock_test.go:2102
Function
TestBoolAssertionFunc
(t *testing.T)
assert/assertions_test.go:2861
Function
TestBoolAssertionFunc
(t *testing.T)
require/requirements_test.go:627
Function
TestBytesEqual
(t *testing.T)
assert/assertions_test.go:2689
Function
TestCallerInfoWithAutogeneratedFunctions
(t *testing.T)
assert/assertions_test.go:2144
Function
TestClosestCallFavorsFirstMock
(t *testing.T)
mock/mock_test.go:2134
Function
TestClosestCallMismatchedArgumentInformationShowsTheClosest
(t *testing.T)
mock/mock_test.go:2119
Function
TestClosestCallMismatchedArgumentValueInformation
(t *testing.T)
mock/mock_test.go:2170
Function
TestClosestCallUsesRepeatabilityToFindClosest
(t *testing.T)
mock/mock_test.go:2150
Function
TestCompare
(t *testing.T)
assert/assertion_compare_test.go:12
Function
TestComparingMsgAndArgsForwarding
(t *testing.T)
assert/assertion_compare_test.go:456
Function
TestComparisonAssertionFunc
(t *testing.T)
assert/assertions_test.go:2754
Function
TestComparisonAssertionFunc
(t *testing.T)
require/requirements_test.go:520
Function
TestConcurrentArgumentRead
(t *testing.T)
mock/mock_test.go:2219
Function
TestCondition
(t *testing.T)
assert/assertions_test.go:1438
Function
TestConditionWrapper
(t *testing.T)
assert/forward_assertions_test.go:223
Function
TestContains
(t *testing.T)
require/requirements_test.go:143
Function
TestContainsNotContains
(t *testing.T)
assert/assertions_test.go:988
Function
TestContainsNotContainsFailMessage
(t *testing.T)
assert/assertions_test.go:1052
Function
TestContainsNotContainsOnNilValue
(t *testing.T)
assert/assertions_test.go:1108
Function
TestContainsWrapper
(t *testing.T)
assert/forward_assertions_test.go:181
Function
TestContainsWrapper
(t *testing.T)
require/forward_requirements_test.go:123
Function
TestCopyExportedFields
(t *testing.T)
assert/assertions_test.go:285
Function
TestDidPanic
(t *testing.T)
assert/assertions_test.go:1451
Function
TestDidPanicWrapper
(t *testing.T)
assert/forward_assertions_test.go:237
Function
TestDiff
(t *testing.T)
assert/assertions_test.go:2462
Function
TestDiffEmptyCases
(t *testing.T)
assert/assertions_test.go:2605
Function
TestDiffLists
(t *testing.T)
assert/assertions_test.go:1308
Function
TestDiffRace
Ensure there are no data races
assert/assertions_test.go:2615
Function
TestDirExists
(t *testing.T)
assert/assertions_test.go:2259
Function
TestElementsMatch
(t *testing.T)
assert/assertions_test.go:1267
Function
TestEmpty
(t *testing.T)
assert/assertions_test.go:1686
Function
TestEmpty
(t *testing.T)
require/requirements_test.go:235
Function
TestEmptyWrapper
(t *testing.T)
assert/forward_assertions_test.go:354
Function
TestEmptyWrapper
(t *testing.T)
require/forward_requirements_test.go:223
Function
TestEqual
(t *testing.T)
assert/assertions_test.go:567
Function
TestEqual
(t *testing.T)
require/requirements_test.go:62
Function
TestEqualError
(t *testing.T)
assert/assertions_test.go:1625
Function
TestEqualError
(t *testing.T)
require/requirements_test.go:224
Function
TestEqualErrorWrapper
(t *testing.T)
assert/forward_assertions_test.go:337
Function
TestEqualErrorWrapper
(t *testing.T)
require/forward_requirements_test.go:211
Function
TestEqualExportedValues
(t *testing.T)
assert/assertions_test.go:368
← previous
next →
801–900 of 1,305, ranked by callers