matcher

package
v14.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmp

func Cmp(t *testing.T, expected interface{}, opts ...cmp.Option) gomock.Matcher

func ErrorEq

func ErrorEq(expectedError string) gomock.Matcher

func GrpcOutgoingCtx added in v14.1.0

func GrpcOutgoingCtx(kv map[string]string) gomock.Matcher

GrpcOutgoingCtx returns a matcher for context.Context that must contain gRPC outgoing metadata with certain key-value pairs.

func ProtoEq

func ProtoEq(t *testing.T, msg interface{}, opts ...cmp.Option) gomock.Matcher

ProtoEq is a better gomock.Eq() that works correctly for protobuf messages. Use this matcher when checking equality of structs that: - are v1 protobuf messages (i.e. implement "github.com/golang/protobuf/proto".Message). - are v2 protobuf messages (i.e. implement "google.golang.org/protobuf/proto".Message). - have fields of the above types. See https://blog.golang.org/protobuf-apiv2 for v1 vs v2 details.

Types

This section is empty.

Jump to

Keyboard shortcuts

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