@@ -48,7 +48,11 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
48
48
}
49
49
puri := fh .URI ()
50
50
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
+ })
52
56
if err != nil {
53
57
return nil , err
54
58
}
@@ -57,7 +61,11 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
57
61
}
58
62
59
63
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
+ })
61
69
if err != nil {
62
70
return nil , err
63
71
}
@@ -79,7 +87,11 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
79
87
for _ , fn := range benchFuncs {
80
88
benches = append (benches , fn .name )
81
89
}
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
+ })
83
95
if err != nil {
84
96
return nil , err
85
97
}
0 commit comments