parent
b7b7f79559
commit
4deba4be78
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user