@@ -47,13 +47,19 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
47
47
}
48
48
puri := fh .URI ()
49
49
for _ , fn := range testFuncs {
50
- cmd := command .NewTestCommand ("run test" , puri , []string {fn .name }, nil )
50
+ cmd := command .NewRunTestsCommand ("run test" , command.RunTestsArgs {
51
+ URI : puri ,
52
+ Tests : []string {fn .name },
53
+ })
51
54
rng := protocol.Range {Start : fn .rng .Start , End : fn .rng .Start }
52
55
codeLens = append (codeLens , protocol.CodeLens {Range : rng , Command : cmd })
53
56
}
54
57
55
58
for _ , fn := range benchFuncs {
56
- cmd := command .NewTestCommand ("run benchmark" , puri , nil , []string {fn .name })
59
+ cmd := command .NewRunTestsCommand ("run benchmark" , command.RunTestsArgs {
60
+ URI : puri ,
61
+ Benchmarks : []string {fn .name },
62
+ })
57
63
rng := protocol.Range {Start : fn .rng .Start , End : fn .rng .Start }
58
64
codeLens = append (codeLens , protocol.CodeLens {Range : rng , Command : cmd })
59
65
}
@@ -72,7 +78,10 @@ func runTestCodeLens(ctx context.Context, snapshot *cache.Snapshot, fh file.Hand
72
78
for _ , fn := range benchFuncs {
73
79
benches = append (benches , fn .name )
74
80
}
75
- cmd := command .NewTestCommand ("run file benchmarks" , puri , nil , benches )
81
+ cmd := command .NewRunTestsCommand ("run file benchmarks" , command.RunTestsArgs {
82
+ URI : puri ,
83
+ Benchmarks : benches ,
84
+ })
76
85
codeLens = append (codeLens , protocol.CodeLens {Range : rng , Command : cmd })
77
86
}
78
87
return codeLens , nil
0 commit comments