Documentation ¶
Index ¶
- func CreateInitialState(config InitialStateConfig, opts ...InitialStateOpt) *core.State
- func CreateVmInfo(config InitialVmInfoConfig, opts ...VmInfoOpt) api.VmInfo
- type Assert
- type Elapsed
- type FakeClock
- type InitialStateConfig
- type InitialStateOpt
- type InitialVmInfoConfig
- type PreparedFunctionCall
- type VmInfoOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateInitialState ¶
func CreateInitialState(config InitialStateConfig, opts ...InitialStateOpt) *core.State
func CreateVmInfo ¶
func CreateVmInfo(config InitialVmInfoConfig, opts ...VmInfoOpt) api.VmInfo
Types ¶
type Assert ¶
type Assert struct {
// contains filtered or unexported fields
}
func (Assert) Call ¶
func (a Assert) Call(f any, args ...any) PreparedFunctionCall
Call sets up a prepared function call, which will not be executed until one of its methods is actually called, which will perform all the relevant checks.
Variadic functions are not supported.
func (Assert) Do ¶
Do calls the function with the provided arguments, checking that no unexpected warnings were generated
This is only valid for functions that return nothing.
func (Assert) NoError ¶
NoError calls the function with the provided arguments, checking that the error it returns is nil, and that no unexpected warnings were generated.
func (Assert) StoredWarnings ¶
StoredWarnings returns a reference to the warnings that will be checked, intended to be used with the InitialStateOpt constructor WithStoredWarnings
func (Assert) WithWarnings ¶
WithWarnings returns an Assert that expects the given warnings to be emitted on each operation
type Elapsed ¶
func (Elapsed) AssertEquals ¶
type FakeClock ¶
type FakeClock struct {
// contains filtered or unexported fields
}
FakeClock is a small facility that makes it easy to operate on duration since start with relative times, rather than absolute times.
func NewFakeClock ¶
NewFakeClock creates a new fake clock, with the initial time set to an unspecified, round number.
func (*FakeClock) Elapsed ¶
Elapsed returns the total time added (via Inc) since the clock was started
type InitialStateConfig ¶
type InitialStateConfig struct { VM InitialVmInfoConfig Core core.Config }
type InitialStateOpt ¶
type InitialStateOpt interface {
// contains filtered or unexported methods
}
func WithConfigSetting ¶
func WithConfigSetting(f func(*core.Config)) InitialStateOpt
func WithStoredWarnings ¶
func WithStoredWarnings(warnings *[]string) InitialStateOpt
func WithTestingLogfWarnings ¶
func WithTestingLogfWarnings(t *testing.T) InitialStateOpt
type InitialVmInfoConfig ¶
type PreparedFunctionCall ¶
type PreparedFunctionCall struct {
// contains filtered or unexported fields
}
PreparedFunctionCall is a function call that has been set up by (Assert).Call() but not executed
func (PreparedFunctionCall) Equals ¶
func (f PreparedFunctionCall) Equals(expected ...any)
Equals calls the prepared function, checking that all the return values are equal to what's expected, and that no unexpected warnings were generated.
type VmInfoOpt ¶
type VmInfoOpt interface { InitialStateOpt // contains filtered or unexported methods }