Stress test added

This commit is contained in:
Alexandra 2021-03-05 15:18:59 +00:00 committed by Fedor Korotkiy
parent 566548847f
commit b6f50e3aba

View file

@ -52,3 +52,10 @@ func TestOncePanic(t *testing.T) {
t.Fatalf("Once.Do called twice") t.Fatalf("Once.Do called twice")
}) })
} }
func TestOnceManyTimes(t *testing.T) {
const N = 1000
for i := 0; i < N; i++ {
TestOnce(t)
}
}