test

package
v0.3.7-HA.1.10.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(t *testing.T, condition bool, msg string, v ...interface{})

func Equal

func Equal(t *testing.T, expected, actual interface{})

func Nil

func Nil(t *testing.T, object interface{})

func NotEqual

func NotEqual(t *testing.T, expected, actual interface{})

func NotNil

func NotNil(t *testing.T, object interface{})

Types

type FakeNetConn

type FakeNetConn struct {
	ReadFunc             func([]byte) (int, error)
	WriteFunc            func([]byte) (int, error)
	CloseFunc            func() error
	LocalAddrFunc        func() net.Addr
	RemoteAddrFunc       func() net.Addr
	SetDeadlineFunc      func(time.Time) error
	SetReadDeadlineFunc  func(time.Time) error
	SetWriteDeadlineFunc func(time.Time) error
}

func NewFakeNetConn

func NewFakeNetConn() FakeNetConn

func (FakeNetConn) Close

func (f FakeNetConn) Close() error

func (FakeNetConn) LocalAddr

func (f FakeNetConn) LocalAddr() net.Addr

func (FakeNetConn) Read

func (f FakeNetConn) Read(b []byte) (int, error)

func (FakeNetConn) RemoteAddr

func (f FakeNetConn) RemoteAddr() net.Addr

func (FakeNetConn) SetDeadline

func (f FakeNetConn) SetDeadline(t time.Time) error

func (FakeNetConn) SetReadDeadline

func (f FakeNetConn) SetReadDeadline(t time.Time) error

func (FakeNetConn) SetWriteDeadline

func (f FakeNetConn) SetWriteDeadline(t time.Time) error

func (FakeNetConn) Write

func (f FakeNetConn) Write(b []byte) (int, error)

type TbLog

type TbLog interface {
	Log(...interface{})
}

type TestLogger

type TestLogger struct {
	TbLog
	Level int32
}

func (*TestLogger) Output

func (tl *TestLogger) Output(maxdepth int, s string) error

func (*TestLogger) OutputErr

func (tl *TestLogger) OutputErr(maxdepth int, s string) error

func (*TestLogger) OutputWarning

func (tl *TestLogger) OutputWarning(maxdepth int, s string) error

Jump to

Keyboard shortcuts

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