mirror of
https://github.com/IBM/fp-go.git
synced 2025-11-25 22:21:49 +02:00
14 lines
314 B
Go
14 lines
314 B
Go
|
|
package testing
|
||
|
|
|
||
|
|
import (
|
||
|
|
EQ "github.com/ibm/fp-go/eq"
|
||
|
|
"github.com/stretchr/testify/assert"
|
||
|
|
)
|
||
|
|
|
||
|
|
// Eq implements the equal operation based on `ObjectsAreEqualValues` from the assertion library
|
||
|
|
func Eq[A any]() EQ.Eq[A] {
|
||
|
|
return EQ.FromEquals(func(l, r A) bool {
|
||
|
|
return assert.ObjectsAreEqualValues(l, r)
|
||
|
|
})
|
||
|
|
}
|