From b71fb5f1718f18a176ec010e81700e0831a6b0c5 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Sun, 8 Sep 2024 19:03:19 -0700 Subject: [PATCH] Add missing leaktest checks. --- taskgroup_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/taskgroup_test.go b/taskgroup_test.go index ee6167c..4e08d7c 100644 --- a/taskgroup_test.go +++ b/taskgroup_test.go @@ -262,6 +262,8 @@ func TestSingleResult(t *testing.T) { } func TestCollector(t *testing.T) { + defer leaktest.Check(t)() + var sum int c := taskgroup.Collect(func(v int) { sum += v }) @@ -291,6 +293,8 @@ func TestCollector(t *testing.T) { } func TestCollector_Report(t *testing.T) { + defer leaktest.Check(t)() + var sum int c := taskgroup.Collect(func(v int) { sum += v })