testing

package
v1.0.143 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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

func LensGet[S, A any](
	t *testing.T,
	eqa E.Eq[A],
) func(l L.Lens[S, A]) func(s S, a A) bool

LensGet tests the law: get(set(a)(s)) = a

func LensSet

func LensSet[S, A any](
	t *testing.T,
	eqs E.Eq[S],
) func(l L.Lens[S, A]) func(s S, a A) bool

LensSet tests the laws: set(get(s))(s) = s set(a)(set(a)(s)) = set(a)(s)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL