package testing
import "github.com/IBM/fp-go/optics/lens/testing"
Index ¶
- func AssertLaws[S, A any]( t *testing.T, eqa E.Eq[A], eqs E.Eq[S], ) func(l L.Lens[S, A]) func(s S, a A) bool
- func LensGet[S, A any]( t *testing.T, eqa E.Eq[A], ) func(l L.Lens[S, A]) func(s S, a A) bool
- func LensSet[S, A any]( t *testing.T, eqs E.Eq[S], ) func(l L.Lens[S, A]) func(s S, a A) bool
Functions ¶
func AssertLaws ¶
func AssertLaws[S, A any]( t *testing.T, eqa E.Eq[A], eqs E.Eq[S], ) func(l L.Lens[S, A]) func(s S, a A) bool
AssertLaws tests the lens laws
get(set(a)(s)) = a set(get(s))(s) = s set(a)(set(a)(s)) = set(a)(s)
func LensGet ¶
LensGet tests the law: get(set(a)(s)) = a
func LensSet ¶
LensSet tests the laws: set(get(s))(s) = s set(a)(set(a)(s)) = set(a)(s)
Source Files ¶
- Version
- v1.0.151 (latest)
- Published
- Nov 23, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 months ago –
Tools for package owners.