Let Todo take other types than *testing.T

This commit is contained in:
b
2026-08-20 20:35:07 -06:00
parent f7ddbb8fc4
commit 18ad9c301a
+2 -2
View File
@@ -16,7 +16,7 @@ import (
"pgregory.net/rapid" "pgregory.net/rapid"
) )
func Todo(t *testing.T) { func Todo[T interface{Errorf(string,...any)}](t T) {
t.Errorf("TODO") 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("returns an error if the second parser returns an error", Todo)
t.Run("succeeds if both parsers succeed", rapid.MakeCheck(func(t *rapid.T) { t.Run("succeeds if both parsers succeed", rapid.MakeCheck(func(t *rapid.T) {
// s := rapid.SliceOfN(rapid.Byte(), 0, 100) // s := rapid.SliceOfN(rapid.Byte(), 0, 100)
t.Errorf("TODO") Todo(t)
})) }))
/* /*
If the first parser fails, then consumption depends on the first parser. If the first parser fails, then consumption depends on the first parser.