Result is failed by default
This commit is contained in:
@ -56,8 +56,10 @@ func TestSlice(t *testing.T) {
|
||||
r := ptest.ErrReaderAt(expectedErr)
|
||||
c := cursor.NewReaderAt(r)
|
||||
s := rapid.SliceOfN(rapid.Byte(), 0, 100).Draw(t, "s")
|
||||
_, err := gigaparsec.Slice(s)(gigaparsec.MakeState(c))
|
||||
result, err := gigaparsec.Slice(s)(gigaparsec.MakeState(c))
|
||||
failed, _, _ := result.Failed()
|
||||
test.ErrorIs(t, err, expectedErr)
|
||||
test.True(t, failed)
|
||||
}))
|
||||
t.Run("succeeds when contents match", rapid.MakeCheck(func(t *rapid.T) {
|
||||
input := rapid.SliceOfN(rapid.Byte(), 1, -1).Draw(t, "input")
|
||||
|
Reference in New Issue
Block a user