test

package
v0.0.0-...-5de3a08 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoMatch

func DoMatch[V any](m func(v V) bool) gomock.Matcher

DoMatch creates lambda matcher instance equipped with lambda function to detect if actual value matches some arbitrary criteria. Lambda matcher implements gomock customer matcher interface https://github.com/golang/mock/blob/5b455625bd2c8ffbcc0de6a0873f864ba3820904/gomock/matchers.go#L25. Sample of usage:

mock.EXPECT().Foo(gomock.All(

   DoMatch(func(v Bar) bool {
	      return v.Greeting == "Hello world"
   }),

))

Types

This section is empty.

Jump to

Keyboard shortcuts

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