test

package module
Version: v0.0.0-...-a1ea475 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2018 License: MIT Imports: 13 Imported by: 4

README

test

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootPath           = os.TempDir()
	ErrNotExcept       = logex.Define("result not expect")
	ErrNotEqual        = logex.Define("result not equals")
	ErrRequireNotEqual = logex.Define("result require not equals")
	StrNotSuchFile     = "no such file or directory"
)

Functions

func CheckError

func CheckError(e error, s string)

func CleanTmp

func CleanTmp()

func Equal

func Equal(a, b interface{}, e ...error)

func EqualBytes

func EqualBytes(got, want []byte)

func Equals

func Equals(o ...interface{})

func False

func False(obj bool)

func Mark

func Mark(obj ...interface{})

func MarkLine

func MarkLine()

func New

func New(t Failer)

func Nil

func Nil(obj interface{})

func NotEqual

func NotEqual(a, b interface{}, e ...error)

func NotNil

func NotNil(obj interface{})

func Panic

func Panic(depth int, obj interface{})

func RandBytes

func RandBytes(n int) []byte

func Read

func Read(r io.Reader, b []byte)

func ReadAndCheck

func ReadAndCheck(r io.Reader, b []byte)

func ReadAt

func ReadAt(r io.ReaderAt, b []byte, at int64)

func ReadString

func ReadString(r io.Reader, s string)

func ReadStringAt

func ReadStringAt(r io.ReaderAt, off int64, s string)

func Root

func Root() string

func SeqBytes

func SeqBytes(n int) []byte

func Should

func Should(b bool, e ...error)

func Skip

func Skip()

func TmpFile

func TmpFile() (*os.File, error)

func True

func True(obj bool)

func Write

func Write(w io.Writer, b []byte)

func WriteAt

func WriteAt(w io.WriterAt, b []byte, at int64)

func WriteString

func WriteString(w io.Writer, s string)

Types

type Failer

type Failer interface {
	FailNow()
}

type MemDisk

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

func NewMemDisk

func NewMemDisk() *MemDisk

func (*MemDisk) Close

func (w *MemDisk) Close() error

func (*MemDisk) Dump

func (w *MemDisk) Dump() string

func (*MemDisk) Read

func (w *MemDisk) Read(b []byte) (int, error)

func (*MemDisk) ReadAt

func (w *MemDisk) ReadAt(b []byte, off int64) (int, error)

func (*MemDisk) SeekRead

func (w *MemDisk) SeekRead(offset int64, whence int) (ret int64)

func (*MemDisk) SeekWrite

func (w *MemDisk) SeekWrite(offset int64, whence int) (ret int64)

func (*MemDisk) Write

func (w *MemDisk) Write(b []byte) (int, error)

func (*MemDisk) WriteAt

func (w *MemDisk) WriteAt(b []byte, off int64) (int, error)

Source Files

Jump to

Keyboard shortcuts

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