Documentation ¶
Overview ¶
Package compare contains the value comparer interface, and types implementing the value comparer interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValuesDiffer ¶
func ValuesDiffer() valuesDiffer
ValuesDiffer returns a ValueComparer for asserting that each value in the sequence of the values supplied to the CompareValues method differs from the preceding value.
func ValuesSame ¶
func ValuesSame() valuesSame
ValuesSame returns a ValueComparer for asserting that each value in the sequence of the values supplied to the CompareValues method is the same as the preceding value.
Types ¶
type ValueComparer ¶
type ValueComparer interface { // CompareValues should assert the given known values against any expectations. // Values are always ordered in the order they were added. Use the error // return to signal unexpected values or implementation errors. CompareValues(values ...any) error }
ValueComparer defines an interface that is implemented to run comparison logic on multiple values. Individual implementations determine how the comparison is performed (e.g., values differ, values equal).
Click to show internal directories.
Click to hide internal directories.