Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGotable-driven testsSingle-choice MCQ

A table-driven test calls t.Fatalf inside a helper invoked from a parallel subtest's spawned goroutine (not the subtest goroutine itself). What happens?

func check(t *testing.T, got, want int) { if got != want { t.Fatalf("got %d want %d", got, want) } } // inside a subtest: go check(t, compute(), tc.want)