@@ -48,7 +48,11 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
4848 }
4949 puri := fh .URI ()
5050 for _ , fn := range testFuncs {
51- cmd , err := command .NewTestCommand ("run test" , puri , []string {fn .name }, nil )
51+ cmd , err := command .NewRunTestsCommand ("run test" , command.RunTestsArgs {
52+ URI : puri ,
53+ Tests : []string {fn .name },
54+ Benchmarks : nil ,
55+ })
5256 if err != nil {
5357 return nil , err
5458 }
@@ -57,7 +61,11 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
5761 }
5862
5963 for _ , fn := range benchFuncs {
60- cmd , err := command .NewTestCommand ("run benchmark" , puri , nil , []string {fn .name })
64+ cmd , err := command .NewRunTestsCommand ("run benchmark" , command.RunTestsArgs {
65+ URI : puri ,
66+ Tests : nil ,
67+ Benchmarks : []string {fn .name },
68+ })
6169 if err != nil {
6270 return nil , err
6371 }
@@ -79,7 +87,11 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
7987 for _ , fn := range benchFuncs {
8088 benches = append (benches , fn .name )
8189 }
82- cmd , err := command .NewTestCommand ("run file benchmarks" , puri , nil , benches )
90+ cmd , err := command .NewRunTestsCommand ("run file benchmarks" , command.RunTestsArgs {
91+ URI : puri ,
92+ Tests : nil ,
93+ Benchmarks : benches ,
94+ })
8395 if err != nil {
8496 return nil , err
8597 }
0 commit comments