Documentation
¶
Index ¶
- Constants
- Variables
- func Bytes(t *testing.T, got, wanted []byte, msgs ...interface{})
- func Error(t *testing.T, err error, msgs ...interface{})
- func Fail(t *testing.T, msgs ...interface{})
- func Float(t *testing.T, got, wanted float64, msgs ...interface{})
- func FloatDiff(t *testing.T, got, wanted, diff float64, msgs ...interface{})
- func Floats(t *testing.T, got, wanted []float64, msgs ...interface{})
- func Minify(t *testing.T, input string, err error, got, wanted string, msgs ...interface{})
- func String(t *testing.T, got, wanted string, msgs ...interface{})
- func T(t *testing.T, got, wanted interface{}, msgs ...interface{})
- func That(t *testing.T, condition bool, msgs ...interface{})
- type EmptyReader
- type ErrorReader
- type ErrorWriter
- type InfiniteReader
- type PlainReader
Constants ¶
const ( Red = "31" Green = "32" )
Variables ¶
var Epsilon = 1e-10
Epsilon is used for floating point comparison.
var ErrPlain = errors.New("error")
ErrPlain is the default error that is returned for functions in this package.
Functions ¶
Types ¶
type EmptyReader ¶
type EmptyReader struct {
}
EmptyReader implements an io.Reader that will always return 0, nil.
type ErrorReader ¶
type ErrorReader struct {
// contains filtered or unexported fields
}
ErrorReader implements an io.Reader that will do N successive reads before it returns ErrPlain.
func NewErrorReader ¶
func NewErrorReader(n int) *ErrorReader
NewErrorReader returns a new ErrorReader.
type ErrorWriter ¶
type ErrorWriter struct {
// contains filtered or unexported fields
}
ErrorWriter implements an io.Writer that will do N successive writes before it returns ErrPlain.
func NewErrorWriter ¶
func NewErrorWriter(n int) *ErrorWriter
NewErrorWriter returns a new ErrorWriter.
type InfiniteReader ¶
type InfiniteReader struct{}
InfiniteReader implements an io.Reader that will always read-in one character.
func NewInfiniteReader ¶
func NewInfiniteReader() *InfiniteReader
NewInfiniteReader returns a new InfiniteReader.
type PlainReader ¶
type PlainReader struct {
// contains filtered or unexported fields
}
PlainReader implements an io.Reader and wraps over an existing io.Reader to hide other functions it implements.
func NewPlainReader ¶
func NewPlainReader(r io.Reader) *PlainReader
NewPlainReader returns a new PlainReader.