This commit is contained in:
parent
f5f7691de0
commit
cfbddb3f39
@ -71,3 +71,10 @@ func TestRestDecreasesLengthForNonEmptyList(t *testing.T) {
|
||||
assert.Equal(t, myList.Len()-1, myList.Rest().Len())
|
||||
})
|
||||
}
|
||||
|
||||
func TestFirstIsNilWhenEmpty(t *testing.T) {
|
||||
rapid.Check(t, func(t *rapid.T) {
|
||||
myList := intListGen().Draw(t, "myList")
|
||||
assert.Equal(t, myList.IsEmpty(), myList.First() == nil)
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user