Documentation ¶
Index ¶
- Constants
- type Capture
- type Context
- func Empty(tb testing.TB) Context[interface{}]
- func EmptyT[CaptureType any](tb testing.TB) Context[CaptureType]
- func ExecFn(tb testing.TB, function any, args ...any) Context[interface{}]
- func ExecFnT[CaptureType any](tb testing.TB, function any, args ...any) Context[CaptureType]
- func Switch[CaptureType any](ctx Context[interface{}]) Context[CaptureType]
- func SwitchT[OriginalCaptureType, CaptureType any](ctx Context[OriginalCaptureType]) Context[CaptureType]
- func Value[CaptureType any](tb testing.TB, value CaptureType) Context[CaptureType]
- func (ctx Context[CaptureType]) Capture() (Capture[CaptureType], Context[CaptureType])
- func (ctx Context[CaptureType]) CaptureError() (Capture[error], Context[CaptureType])
- func (ctx Context[CaptureType]) CaptureObject() (Capture[objects.Object], Context[CaptureType])
- func (ctx Context[CaptureType]) Collect(args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Empty() Context[CaptureType]
- func (ctx Context[CaptureType]) Emptyf(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Equals(expected any) Context[CaptureType]
- func (ctx Context[CaptureType]) Equalsf(expected any, format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Error() Context[CaptureType]
- func (ctx Context[CaptureType]) ErrorCode(code errors.ErrorCode) Context[CaptureType]
- func (ctx Context[CaptureType]) ErrorCodef(code errors.ErrorCode, format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) ErrorContainsObject(expected objects.Object) Context[CaptureType]
- func (ctx Context[CaptureType]) ErrorContainsObjectf(expected objects.Object, format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) ErrorMatches(expected string) Context[CaptureType]
- func (ctx Context[CaptureType]) ErrorMatchesf(expected string, format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Errorf(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) False() Context[CaptureType]
- func (ctx Context[CaptureType]) Falsef(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Fatal() Context[CaptureType]
- func (ctx Context[CaptureType]) Flatten() Context[CaptureType]
- func (ctx Context[CaptureType]) IsNil() Context[CaptureType]
- func (ctx Context[CaptureType]) IsNilf(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) IsNotNil() Context[CaptureType]
- func (ctx Context[CaptureType]) IsNotNilf(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Len(expected int) Context[CaptureType]
- func (ctx Context[CaptureType]) Lenf(expected int, format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) NoError() Context[CaptureType]
- func (ctx Context[CaptureType]) NoErrorf(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) NonFatal() Context[CaptureType]
- func (ctx Context[CaptureType]) NotEmpty() Context[CaptureType]
- func (ctx Context[CaptureType]) NotEmptyf(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) ObjectEquals(expected any) Context[CaptureType]
- func (ctx Context[CaptureType]) ObjectEqualsf(expected any, format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Skip() Context[CaptureType]
- func (ctx Context[CaptureType]) True() Context[CaptureType]
- func (ctx Context[CaptureType]) Truef(format string, args ...any) Context[CaptureType]
- func (ctx Context[CaptureType]) Validate(validate ValidateFn[CaptureType]) Context[CaptureType]
- func (ctx Context[CaptureType]) Validatef(validate ValidateFnf[CaptureType]) Context[CaptureType]
- type ValidateFn
- type ValidateFnf
Constants ¶
View Source
const (
ActualFormatKey = "%actual%"
)
View Source
const (
ValidateSuccess string = "__success__"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context[CaptureType any] struct { // contains filtered or unexported fields }
func (Context[CaptureType]) CaptureError ¶
func (Context[CaptureType]) CaptureObject ¶ added in v0.1.2
func (Context[CaptureType]) ErrorCodef ¶ added in v0.1.2
func (Context[CaptureType]) ErrorContainsObject ¶ added in v0.1.2
func (Context[CaptureType]) ErrorContainsObjectf ¶ added in v0.1.2
func (Context[CaptureType]) ErrorMatches ¶
func (Context[CaptureType]) ErrorMatchesf ¶
func (Context[CaptureType]) ObjectEquals ¶ added in v0.1.2
func (Context[CaptureType]) ObjectEqualsf ¶ added in v0.1.2
func (Context[CaptureType]) Validate ¶
func (ctx Context[CaptureType]) Validate(validate ValidateFn[CaptureType]) Context[CaptureType]
func (Context[CaptureType]) Validatef ¶
func (ctx Context[CaptureType]) Validatef(validate ValidateFnf[CaptureType]) Context[CaptureType]
type ValidateFn ¶
type ValidateFnf ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.