diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-02-14 19:01:57 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-02-17 08:18:57 +0000 |
| commit | 4121cf9df313ee111c01fde1f255d010c8d941cd (patch) | |
| tree | dcd0d104c8c35997103297dfb7dc1f0de6b77b8e /prog | |
| parent | 9f05da3db0234203729d2ad179ab5a2f72bf607f (diff) | |
all: remove loop variables scoping
Diffstat (limited to 'prog')
| -rw-r--r-- | prog/alloc_test.go | 1 | ||||
| -rw-r--r-- | prog/encodingexec_test.go | 1 | ||||
| -rw-r--r-- | prog/export_test.go | 2 | ||||
| -rw-r--r-- | prog/mutation_test.go | 2 | ||||
| -rw-r--r-- | prog/rotation_test.go | 1 |
5 files changed, 0 insertions, 7 deletions
diff --git a/prog/alloc_test.go b/prog/alloc_test.go index 24fef233d..f55997e13 100644 --- a/prog/alloc_test.go +++ b/prog/alloc_test.go @@ -62,7 +62,6 @@ func TestMemAlloc(t *testing.T) { }, } for ti, test := range tests { - test := test t.Run(fmt.Sprint(ti), func(t *testing.T) { ma := newMemAlloc(16 << 20) for i, op := range test { diff --git a/prog/encodingexec_test.go b/prog/encodingexec_test.go index f968b6cf2..8687ddb69 100644 --- a/prog/encodingexec_test.go +++ b/prog/encodingexec_test.go @@ -655,7 +655,6 @@ test$res1(r0) } for i, test := range tests { - i, test := i, test t.Run(fmt.Sprintf("%v:%v", i, test.prog), func(t *testing.T) { p, err := target.Deserialize([]byte(test.prog), Strict) if err != nil { diff --git a/prog/export_test.go b/prog/export_test.go index 0b1b8c599..28eb99b9e 100644 --- a/prog/export_test.go +++ b/prog/export_test.go @@ -35,7 +35,6 @@ func initTest(t *testing.T) (*Target, rand.Source, int) { func testEachTarget(t *testing.T, fn func(t *testing.T, target *Target)) { t.Parallel() for _, target := range AllTargets() { - target := target t.Run(fmt.Sprintf("%v/%v", target.OS, target.Arch), func(t *testing.T) { skipTargetRace(t, target) t.Parallel() @@ -50,7 +49,6 @@ func testEachTargetRandom(t *testing.T, fn func(t *testing.T, target *Target, rs iters := max(testutil.IterCount()/len(targets), 3) rs0 := testutil.RandSource(t) for _, target := range targets { - target := target rs := rand.NewSource(rs0.Int63()) t.Run(fmt.Sprintf("%v/%v", target.OS, target.Arch), func(t *testing.T) { skipTargetRace(t, target) diff --git a/prog/mutation_test.go b/prog/mutation_test.go index 14e80a73b..1cd18656e 100644 --- a/prog/mutation_test.go +++ b/prog/mutation_test.go @@ -136,7 +136,6 @@ func TestMutateArgument(t *testing.T) { target := initTargetTest(t, "test", "64") for ti, test := range tests { - test := test t.Run(fmt.Sprint(ti), func(t *testing.T) { t.Parallel() rs, ct, p, goal, err := buildTestContext(test, target) @@ -410,7 +409,6 @@ func runMutationTests(t *testing.T, tests [][2]string, valid bool) { } target := initTargetTest(t, "test", "64") for ti, test := range tests { - test := test t.Run(fmt.Sprint(ti), func(t *testing.T) { t.Parallel() rs, ct, p, goal, err := buildTestContext(test, target) diff --git a/prog/rotation_test.go b/prog/rotation_test.go index 333b66c75..959d8929d 100644 --- a/prog/rotation_test.go +++ b/prog/rotation_test.go @@ -27,7 +27,6 @@ func TestRotationResourceless(t *testing.T) { func TestRotationRandom(t *testing.T) { target, rs, _ := initTest(t) for _, ncalls := range []int{10, 100, 1000, 1e9} { - ncalls := ncalls rnd := rand.New(rand.NewSource(rs.Int63())) t.Run(fmt.Sprint(ncalls), func(t *testing.T) { t.Parallel() |
