diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-06 10:56:27 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-06 10:56:27 +0300 |
| commit | 320de746f7a2985b60c8564a0e65bdf231e840b7 (patch) | |
| tree | e70bcf50813dba411afa2934e774383124bbc99e /internal/lsp/codegen_helpers_test.go | |
| parent | 06247527d5170f329b454b42f59a3e4434ab1f4b (diff) | |
use gofumpt
Diffstat (limited to 'internal/lsp/codegen_helpers_test.go')
| -rw-r--r-- | internal/lsp/codegen_helpers_test.go | 19 |
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) + } } - |
