testing

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileContains

func FileContains(t *testing.T, path, substring string) bool

FileContains returns true if the substring is found in the file located at path, false otherwise. If a read error occurs, it makes the associated test fail.

Types

type LogHandler

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

LogHandler represents a testing logger implementing the inconshreveable/log15.v2 Handler interface.

func NewLogHandler

func NewLogHandler(t *testing.T) *LogHandler

NewLogHandler returns a new LogHandler instance.

func (*LogHandler) Log

func (h *LogHandler) Log(r *log15.Record) error

Log logs a log15.Record to the testing logger if the tests are run in verbose mode.

Jump to

Keyboard shortcuts

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