test

package
v0.0.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2022 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConnection

type MockConnection struct {
	// contains filtered or unexported fields
}

func NewMockConnection

func NewMockConnection(t *testing.T) *MockConnection

func (*MockConnection) AssertCalled

func (mc *MockConnection) AssertCalled(method string) bool

func (*MockConnection) AssertNotCalled

func (mc *MockConnection) AssertNotCalled(method string) bool

func (*MockConnection) AssertNumberOfCalls

func (mc *MockConnection) AssertNumberOfCalls(method string, calls uint) bool

func (*MockConnection) Close

func (mc *MockConnection) Close() error

Close implements io.ReadWriteCloser

func (*MockConnection) Logf

func (mc *MockConnection) Logf(msg string, args ...any)

func (*MockConnection) PushNextReadBytes

func (mc *MockConnection) PushNextReadBytes(p []byte)

func (*MockConnection) PushNextReadError

func (mc *MockConnection) PushNextReadError(err error)

func (*MockConnection) PushPayloadForRead

func (mc *MockConnection) PushPayloadForRead(payloadType uint32, p []byte, yo binary.ByteOrder)

func (*MockConnection) Read

func (mc *MockConnection) Read(p []byte) (n int, err error)

Read implements io.ReadWriteCloser

func (*MockConnection) SetNextWriteResult

func (mc *MockConnection) SetNextWriteResult(n int, err error)

func (*MockConnection) Write

func (mc *MockConnection) Write(p []byte) (n int, err error)

Write implements io.ReadWriteCloser

func (*MockConnection) WriteAt

func (mc *MockConnection) WriteAt(n int) []byte

type ReadValue

type ReadValue struct {
	union.Union[[]byte, error]
}

func (ReadValue) Bytes

func (r ReadValue) Bytes() []byte

func (ReadValue) Error

func (r ReadValue) Error() error

func (ReadValue) WithBytes

func (r ReadValue) WithBytes(p []byte) ReadValue

func (ReadValue) WithError

func (r ReadValue) WithError(err error) ReadValue

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL