sfxtest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrCheck

type ErrCheck func(string) error

ErrCheck is a type of function that can be passed in that forces an return of some error

func ForcedError

func ForcedError(err error, names ...string) ErrCheck

ForcedError creates an ErrCheck that returns err for any functions with names

type ErrChecker

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

ErrChecker is used to force errors for testing error code paths

func (*ErrChecker) CheckForError

func (ec *ErrChecker) CheckForError(s string) error

CheckForError check to see if an error should be thrown based on the existence ErrCheck and whether it returns an error

func (*ErrChecker) SetErrorCheck

func (ec *ErrChecker) SetErrorCheck(errCheck ErrCheck)

SetErrorCheck sets the ErrCheck for this instance

Jump to

Keyboard shortcuts

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