summaryrefslogtreecommitdiff
path: root/internal/lsp/codegen_helpers_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-06 10:56:27 +0300
committerPaul Buetow <paul@buetow.org>2025-09-06 10:56:27 +0300
commit320de746f7a2985b60c8564a0e65bdf231e840b7 (patch)
treee70bcf50813dba411afa2934e774383124bbc99e /internal/lsp/codegen_helpers_test.go
parent06247527d5170f329b454b42f59a3e4434ab1f4b (diff)
use gofumpt
Diffstat (limited to 'internal/lsp/codegen_helpers_test.go')
-rw-r--r--internal/lsp/codegen_helpers_test.go19
1 files changed, 13 insertions, 6 deletions
diff --git a/internal/lsp/codegen_helpers_test.go b/internal/lsp/codegen_helpers_test.go
index d897953..de43b7d 100644
--- a/internal/lsp/codegen_helpers_test.go
+++ b/internal/lsp/codegen_helpers_test.go
@@ -3,13 +3,20 @@ package lsp
import "testing"
func TestParseGoPackageName(t *testing.T) {
- lines := []string{"// comment", "package mypkg // trailing"}
- if got := parseGoPackageName(lines); got != "mypkg" { t.Fatalf("got %q", got) }
- if got := parseGoPackageName([]string{"no package"}); got != "" { t.Fatalf("expected empty") }
+ lines := []string{"// comment", "package mypkg // trailing"}
+ if got := parseGoPackageName(lines); got != "mypkg" {
+ t.Fatalf("got %q", got)
+ }
+ if got := parseGoPackageName([]string{"no package"}); got != "" {
+ t.Fatalf("expected empty")
+ }
}
func TestDeriveGoFuncName(t *testing.T) {
- if got := deriveGoFuncName("func Sum(a int) int { return a }"); got != "Sum" { t.Fatalf("got %q", got) }
- if got := deriveGoFuncName("func (t *Type) Method(x int) {}"); got != "Method" { t.Fatalf("got %q", got) }
+ if got := deriveGoFuncName("func Sum(a int) int { return a }"); got != "Sum" {
+ t.Fatalf("got %q", got)
+ }
+ if got := deriveGoFuncName("func (t *Type) Method(x int) {}"); got != "Method" {
+ t.Fatalf("got %q", got)
+ }
}
-