Test Repeat success/failure
This commit is contained in:
@ -26,3 +26,11 @@ func ErrReaderAt(err error) io.ReaderAt {
|
||||
func StateIsAt[Input any](t test.T, s gigaparsec.State[Input], pos uint64) {
|
||||
test.EqOp(t, pos, s.Pos(), test.Sprintf("expected parser state to be at position %d, got %d", pos, s.Pos()))
|
||||
}
|
||||
|
||||
func SliceOfN[T any](value T, n int) []T {
|
||||
s := make([]T, n)
|
||||
for i := range s {
|
||||
s[i] = value
|
||||
}
|
||||
return s
|
||||
}
|
Reference in New Issue
Block a user