testingp

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

README

testing

Plus to the standard testing package

Godoc: testingp assert

// *WriterTB implements the testing.TB interface.
// An io.Writer can be specified as the destination of logging.
// This type is especially useful for writing testcases of tools for testing.
type WriterTB struct {
	io.Writer
    Suffix string
	...
}

LICENSE

BSD license

Documentation

Overview

Package testingp is a plus to standard "testing" package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// error thrown when failed
	FailedErr = errors.New("FailedErr")
	// error thrown when skipped
	SkippedErr = errors.New("SkippedErr")
)

Functions

This section is empty.

Types

type WriterTB

type WriterTB struct {
	// this embeding implements private methods of testing.TB
	testing.TB

	// The destination of the logs
	io.Writer
	// The suffix for each log
	Suffix string
	// contains filtered or unexported fields
}

*WriterTB implements the testing.TB interface. An io.Writer can be specified as the destination of logging. Skipped and failed status are also stored. FailedErr is thrown when FailNow is called and SkippedErr for SkipNow.

This type is especially useful for writing testcases of tools for testing.

func (*WriterTB) Error

func (wtb *WriterTB) Error(args ...interface{})

func (*WriterTB) Errorf

func (wtb *WriterTB) Errorf(format string, args ...interface{})

func (*WriterTB) Fail

func (wtb *WriterTB) Fail()

func (*WriterTB) FailNow

func (wtb *WriterTB) FailNow()

func (*WriterTB) Failed

func (wtb *WriterTB) Failed() bool

func (*WriterTB) Fatal

func (wtb *WriterTB) Fatal(args ...interface{})

func (*WriterTB) Fatalf

func (wtb *WriterTB) Fatalf(format string, args ...interface{})

func (*WriterTB) Log

func (wtb *WriterTB) Log(args ...interface{})

func (*WriterTB) Logf

func (wtb *WriterTB) Logf(format string, args ...interface{})

func (*WriterTB) Skip

func (wtb *WriterTB) Skip(args ...interface{})

func (*WriterTB) SkipNow

func (wtb *WriterTB) SkipNow()

func (*WriterTB) Skipf

func (wtb *WriterTB) Skipf(format string, args ...interface{})

func (*WriterTB) Skipped

func (wtb *WriterTB) Skipped() bool

Directories

Path Synopsis
Package assert provides some assertion functions for testing.
Package assert provides some assertion functions for testing.

Jump to

Keyboard shortcuts

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