diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2025-01-17 10:28:16 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2025-01-17 10:02:07 +0000 |
| commit | 5d04aae8969f6c72318ce0a4cde4f027766b1a55 (patch) | |
| tree | 8f1b632847c431407090f0fe1335522ff2195a37 /prog/export_test.go | |
| parent | f9e07a6e597b68d3397864e6ee4550f9065c3518 (diff) | |
all: use min/max functions
They are shorter, more readable, and don't require temp vars.
Diffstat (limited to 'prog/export_test.go')
| -rw-r--r-- | prog/export_test.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/prog/export_test.go b/prog/export_test.go index 54992dba1..0b1b8c599 100644 --- a/prog/export_test.go +++ b/prog/export_test.go @@ -47,11 +47,7 @@ func testEachTarget(t *testing.T, fn func(t *testing.T, target *Target)) { func testEachTargetRandom(t *testing.T, fn func(t *testing.T, target *Target, rs rand.Source, iters int)) { t.Parallel() targets := AllTargets() - iters := testutil.IterCount() - iters /= len(targets) - if iters < 3 { - iters = 3 - } + iters := max(testutil.IterCount()/len(targets), 3) rs0 := testutil.RandSource(t) for _, target := range targets { target := target |
