clean up
All checks were successful
Go / test (push) Successful in 3s

This commit is contained in:
Adam Jeniski 2025-11-04 17:50:32 -10:00
parent b7b7f79559
commit 4deba4be78

View File

@ -21,7 +21,6 @@ func intListGen() *rapid.Generator[IList] {
}), rapid.Just(Empty())) }), rapid.Just(Empty()))
} }
// generative tests
func TestConjIncreasesLength(t *testing.T) { func TestConjIncreasesLength(t *testing.T) {
rapid.Check(t, func(t *rapid.T) { rapid.Check(t, func(t *rapid.T) {
myList := intListGen().Draw(t, "myList") myList := intListGen().Draw(t, "myList")
@ -41,6 +40,7 @@ func TestRestDecreasesLength(t *testing.T) {
} }
func TestFirstIsNilWhenEmpty(t *testing.T) { func TestFirstIsNilWhenEmpty(t *testing.T) {
assert.Equal(t, 1, New(3).Conj(2).Conj(1).First())
rapid.Check(t, func(t *rapid.T) { rapid.Check(t, func(t *rapid.T) {
myList := intListGen().Draw(t, "myList") myList := intListGen().Draw(t, "myList")
assert.Equal(t, myList.IsEmpty(), myList.First() == nil) assert.Equal(t, myList.IsEmpty(), myList.First() == nil)