testutil

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorContains

func ErrorContains(t *testing.T, out error, want string)

ErrorContains checks if the error string contains the wanted pattern

Types

type TestPrint

type TestPrint struct {
	Name   string
	Prints []string
}

TestPrint is for capturing test output

func Printer

func Printer(name string) *TestPrint

Printer is for capturing test output

func (*TestPrint) Check

func (tp *TestPrint) Check(t *testing.T, want []string)

Check is for checking test output

func (*TestPrint) CheckPrefix

func (tp *TestPrint) CheckPrefix(t *testing.T, want []string)

CheckPrefix is for checking test output

func (*TestPrint) CheckString added in v1.3.0

func (tp *TestPrint) CheckString(t *testing.T, want string)

CheckString is for checking test output

func (*TestPrint) Printf

func (tp *TestPrint) Printf(format string, args ...interface{})

Printf is for capturing test output

Jump to

Keyboard shortcuts

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