Documentation
¶
Overview ¶
Package asserts holds tiny test assertion helpers shared across botbooter.
Index ¶
- func CheckBannedImports(t TestingT, dir string, banned []string, label string)
- func Equal[T comparable](t TestingT, got, expected T, message string)
- func Error(t TestingT, err error, message string)
- func ErrorIs(t TestingT, err, target error, message string)
- func False(t TestingT, got bool, message string)
- func NoError(t TestingT, err error, message string)
- func NotNil(t TestingT, got any, message string)
- func True(t TestingT, got bool, message string)
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBannedImports ¶ added in v0.3.0
CheckBannedImports parses every non-test Go file in dir and fails t if any file imports a path containing one of the banned substrings. label names the package for error messages (e.g. "cli", "core"). It is the shared body of the per-package import guards that lock in the platform-SDK decoupling.
func Equal ¶
func Equal[T comparable](t TestingT, got, expected T, message string)
Equal fails the test with message if got is not equal to expected.
Types ¶
Click to show internal directories.
Click to hide internal directories.