diff options
Diffstat (limited to 'internal/lsp')
| -rw-r--r-- | internal/lsp/codeaction_prompts_test.go | 2 | ||||
| -rw-r--r-- | internal/lsp/completion_messages_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/lsp/codeaction_prompts_test.go b/internal/lsp/codeaction_prompts_test.go index c5fd5e2..8b07dfe 100644 --- a/internal/lsp/codeaction_prompts_test.go +++ b/internal/lsp/codeaction_prompts_test.go @@ -59,7 +59,7 @@ func TestResolveCodeAction_UsesDiagnosticsPrompts(t *testing.T) { if cap.msgs[0].Content != "DSYS" || cap.msgs[1].Role != "user" { t.Fatalf("unexpected diagnostics prompts: %#v", cap.msgs) } - if got := cap.msgs[1].Content; !(contains(got, "oops1") && contains(got, "oops2") && contains(got, "var a")) { + if got := cap.msgs[1].Content; !contains(got, "oops1") || !contains(got, "oops2") || !contains(got, "var a") { t.Fatalf("diagnostics/user content mismatch: %q", got) } } diff --git a/internal/lsp/completion_messages_test.go b/internal/lsp/completion_messages_test.go index f0c693c..bc02645 100644 --- a/internal/lsp/completion_messages_test.go +++ b/internal/lsp/completion_messages_test.go @@ -89,7 +89,7 @@ func contains(s, sub string) bool { } func stringIndex(s, sub string) int { - return len([]rune(s[:])) - len([]rune(s[:])) + (func() int { return intIndex(s, sub) })() + return intIndex(s, sub) } func intIndex(s, sub string) int { return Index(s, sub) } |
