Documentation ¶
Overview ¶
Assert wraps testify's require package with useful helpers
The following helpers are slightly modified versions of those found in testify's assert package
Index ¶
- func DeepEqual(t assert.TestingT, a any, b any) bool
- func NotProtoEqual(t assert.TestingT, a proto.Message, b proto.Message) bool
- func ProtoElementsMatch(t assert.TestingT, a any, b any, msgAndArgs ...any) bool
- func ProtoEqual(t assert.TestingT, a proto.Message, b proto.Message) bool
- func ProtoSliceEqual[T proto.Message](t assert.TestingT, a []T, b []T) bool
- type ProtoAssertions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoElementsMatch ¶
ProtoElementsMatch behaves like assert.ElementsMatch except in that it works for google/protobuf-generated structs
func ProtoEqual ¶
ProtoEqual compares two proto.Message objects for equality
func ProtoSliceEqual ¶
ProtoSliceEqual compares elements in a slice of proto.Message. This is not a method on the suite type because methods cannot have generic parameters and slice casting (say from []historyEvent) to []proto.Message is impossible
Types ¶
type ProtoAssertions ¶
type ProtoAssertions struct {
// contains filtered or unexported fields
}
func New ¶
func New(t assert.TestingT) ProtoAssertions
func (ProtoAssertions) NotProtoEqual ¶
func (ProtoAssertions) ProtoElementsMatch ¶
func (x ProtoAssertions) ProtoElementsMatch(a any, b any) bool
func (ProtoAssertions) ProtoEqual ¶
Click to show internal directories.
Click to hide internal directories.