1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-11-25 22:21:49 +02:00
Files
fp-go/eq/testing/eq.go

14 lines
314 B
Go
Raw Normal View History

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)
})
}