This commit is contained in:
parent
6155074b77
commit
b7b7f79559
@ -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())
|
||||||
assert.Equal(t, myList.Len()-1, myList.Rest().Len())
|
} else {
|
||||||
|
assert.Equal(t, myList.Len()-1, myList.Rest().Len())
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user