blob: 7e8e5e78ad7718934fb0a08aef25a57bd16adf22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package lsp
import "testing"
func TestBuildPrompts_Table(t *testing.T) {
p := CompletionParams{TextDocument: TextDocumentIdentifier{URI: "file:///x.go"}, Position: Position{Line: 5, Character: 7}}
cases := []struct {
name string
inParams bool
}{
{"generic", false},
{"in_params", true},
}
for _, c := range cases {
sys, user := buildPrompts(c.inParams, p, "above", "current", "below", "func ctx")
if sys == "" || user == "" {
t.Fatalf("%s: prompts empty", c.name)
}
}
}
|