func Test(t *testing.T) { … } // doTest checks that the result of NonZero matches the nonzero argument, and // that zeroing out that result matches the zero argument. func doTest[T any](t *testing.T, nonzero, zero T) { … }
func Test(t *testing.T) { … } // doTest checks that the result of NonZero matches the nonzero argument, and // that zeroing out that result matches the zero argument. func doTest[T any](t *testing.T, nonzero, zero T) { … }