package
Version:
v0.21.1
Opens a new window with list of versions in this module.
Published: Apr 28, 2026
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func Expect(t TestingT, failMessage string, got, want any, options ...cmp.Option)
-
func ExpectContains[T any](t TestingT, failMessage string, slice []T, want T, options ...cmp.Option)
-
func ExpectPanic(t TestingT, want string, fn func())
-
type TestingT
Expect compares two values and fails the test if they are different.
ExpectContains asserts that slice contains an element equal to want.
ExpectPanic asserts that a function panics with a specific value.
type TestingT interface {
Helper()
Fatal(args ...any)
Log(args ...any)
Failed() bool
}
TestingT is the subset of testing.TB needed by these helpers.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.