@@ -58,7 +58,6 @@ func TestComplexExamplesCompile(t *testing.T) {
5858 "tests/complex/chudnovsky.vibe" ,
5959 }
6060 for _ , path := range files {
61- path := path
6261 t .Run (filepath .Base (path ), func (t * testing.T ) {
6362 full := filepath .Join (".." , path )
6463 data , err := os .ReadFile (full )
@@ -262,7 +261,6 @@ func TestComplexExamplesRun(t *testing.T) {
262261 }
263262
264263 for _ , tc := range cases {
265- tc := tc
266264 t .Run (tc .name , func (t * testing.T ) {
267265 script := compileComplexExample (t , tc .file )
268266 opts := CallOptions {}
@@ -421,7 +419,6 @@ func TestProgramFixtures(t *testing.T) {
421419 }
422420
423421 for _ , tc := range cases {
424- tc := tc
425422 t .Run (tc .name , func (t * testing.T ) {
426423 script := compileTestProgram (t , tc .file )
427424 result , err := script .Call (context .Background (), tc .function , nil , CallOptions {})
@@ -492,7 +489,7 @@ func TestComplexExamplesStress(t *testing.T) {
492489 }
493490
494491 piScript := compileComplexExampleWithConfig (t , "chudnovsky.vibe" , highQuota )
495- for i := 0 ; i < 50 ; i ++ {
492+ for i := range 50 {
496493 val , err := piScript .Call (context .Background (), "pi_approx_precise" , []Value {intVal (5_000 )}, CallOptions {})
497494 if err != nil {
498495 t .Fatalf ("pi_approx_precise run %d failed: %v" , i , err )
@@ -529,7 +526,6 @@ func TestAllVibeFilesCompileAndRun(t *testing.T) {
529526
530527 engine := MustNewEngine (Config {StepQuota : 5_000_000 })
531528 for _ , path := range files {
532- path := path
533529 rel , _ := filepath .Rel (testsDir , path )
534530 t .Run (rel , func (t * testing.T ) {
535531 source , err := os .ReadFile (path )
731727 t .Fatalf ("compile: %v" , err )
732728 }
733729
734- for i := 0 ; i < 100 ; i ++ {
730+ for i := range 100 {
735731 result , err := script .Call (context .Background (), "run" , nil , CallOptions {})
736732 if err != nil {
737733 t .Fatalf ("run %d: %v" , i , err )
762758 t .Fatalf ("compile: %v" , err )
763759 }
764760
765- for i := 0 ; i < 50 ; i ++ {
761+ for i := range 50 {
766762 result , err := script .Call (context .Background (), "run" , nil , CallOptions {})
767763 if err != nil {
768764 t .Fatalf ("run %d: %v" , i , err )
0 commit comments