golf coverage
All checks were successful
Go / test (push) Successful in 3s

This commit is contained in:
Adam Jeniski 2025-11-04 17:37:53 -10:00
parent 6155074b77
commit b7b7f79559

View File

@ -29,12 +29,14 @@ func TestConjIncreasesLength(t *testing.T) {
}) })
} }
func TestRestDecreasesLengthForNonEmptyList(t *testing.T) { func TestRestDecreasesLength(t *testing.T) {
rapid.Check(t, func(t *rapid.T) { rapid.Check(t, func(t *rapid.T) {
myList := intListGen().Filter(func(l IList) bool { myList := intListGen().Draw(t, "myList")
return !l.IsEmpty() if myList.IsEmpty() {
}).Draw(t, "myList") assert.Equal(t, 0, myList.Rest().Len())
} else {
assert.Equal(t, myList.Len()-1, myList.Rest().Len()) assert.Equal(t, myList.Len()-1, myList.Rest().Len())
}
}) })
} }