From 18ad9c301ae828d0c35d50eeaed34c2158259730 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Thu, 20 Aug 2026 20:35:07 -0600 Subject: [PATCH] Let Todo take other types than *testing.T --- parser_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser_test.go b/parser_test.go index 388b64d..2e6a21d 100644 --- a/parser_test.go +++ b/parser_test.go @@ -16,7 +16,7 @@ import ( "pgregory.net/rapid" ) -func Todo(t *testing.T) { +func Todo[T interface{Errorf(string,...any)}](t T) { t.Errorf("TODO") } @@ -90,7 +90,7 @@ func TestBind(t *testing.T) { t.Run("returns an error if the second parser returns an error", Todo) t.Run("succeeds if both parsers succeed", rapid.MakeCheck(func(t *rapid.T) { // s := rapid.SliceOfN(rapid.Byte(), 0, 100) - t.Errorf("TODO") + Todo(t) })) /* If the first parser fails, then consumption depends on the first parser.