gomock

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AContext added in v0.4.10

func AContext() gomock.Matcher

AContext returns a matcher that matches a context.Context.

func CustomMatcher added in v0.4.11

func CustomMatcher(matcher func(x interface{}, state map[string]interface{}) bool, stringer func(state map[string]interface{}) string) gomock.Matcher

CustomMatcher creates a matcher from two funcs rather than having to make a new struct and implement Matcher.

func DiffEq

func DiffEq(x interface{}) gomock.Matcher

DiffEq will verify cmp.Diff(expected, actual) == "" using github.com/google/go-cmp/cmp.

func ErrStrEq

func ErrStrEq(expected string) gomock.Matcher

ErrStrEq will verify the string matches error.Error().

Types

type LogMatcher

type LogMatcher interface {
	types.GomegaMatcher
	WithLevel(int) LogMatcher
	WithLogFunc(string) LogMatcher
}

LogMatcher is a Gomega matcher for logs.

Jump to

Keyboard shortcuts

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