Documentation
¶
Index ¶
- func CheckErrorStrings(t TB, got []string, expected []string)
- func CollectErrors(err error) []string
- func Equals[T any](t TB, a, b T)
- func Error(t TB, err error)
- func ErrorIs(t TB, got, want error)
- func FatalIf(t TB, c bool, f string, args ...any)
- func JSONMarshalsTo[T any](t TB, obj T, want string)
- func Must[T any](t T, err error) T
- func OK(t TB, err error)
- func Panic(t TB, f func())
- type TB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckErrorStrings ¶ added in v1.6.0
CheckErrorStrings verifies that the actual error strings match the expected error strings. Both slices are sorted before comparison to handle ordering differences. Strings are normalized to remove cosmetic paren differences between Go and Rust Cedar formatting.
func CollectErrors ¶ added in v1.6.0
CollectErrors recursively collects all leaf error strings from a (possibly joined) error.
func JSONMarshalsTo ¶ added in v1.0.0
JSONMarshalsTo asserts that obj marshals as JSON to the given string, allowing for formatting differences and displaying an easy-to-read diff.
Types ¶
Click to show internal directories.
Click to hide internal directories.