logtestor

package
v1.0.1-0...-475848a Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogTestor

type LogTestor struct {
	// Internal Log buffer
	Log []string
}

LogTestor is test helper that asserts gathered logs.

func New

func New() *LogTestor

New returns a new LogTestor

func (*LogTestor) Append

func (l *LogTestor) Append(s string)

Append new string to log

func (*LogTestor) Assert

func (l *LogTestor) Assert(t *testing.T, exp ...string)

Assert log content, clear internal log after assert.

func (*LogTestor) AssertEmpty

func (l *LogTestor) AssertEmpty(t *testing.T)

Assert log buffer is empty.

Jump to

Keyboard shortcuts

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