diff options
Diffstat (limited to 'internal/lsp/instruction_table_test.go')
| -rw-r--r-- | internal/lsp/instruction_table_test.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/internal/lsp/instruction_table_test.go b/internal/lsp/instruction_table_test.go index 06364db..ff750ca 100644 --- a/internal/lsp/instruction_table_test.go +++ b/internal/lsp/instruction_table_test.go @@ -3,22 +3,22 @@ package lsp import "testing" func TestFindFirstInstructionInLine_Table(t *testing.T) { - cases := []struct{ - name string - line string - instr string - }{ - {"strict_inline_marker", ">do> trailing", "do"}, - {"c_block", "x /* add docs */ y", "add docs"}, - {"html_comment", "<!-- fix --> code", "fix"}, - {"slash_slash", "code // please refactor", "please refactor"}, - {"hash", "# summarize", "summarize"}, - {"double_dash", "-- rewrite quickly", "rewrite quickly"}, - } - for _, c := range cases { - instr, _, ok := findFirstInstructionInLine(c.line) - if !ok || instr != c.instr { - t.Fatalf("%s: got %q ok=%v", c.name, instr, ok) - } - } + cases := []struct { + name string + line string + instr string + }{ + {"strict_inline_marker", ">do> trailing", "do"}, + {"c_block", "x /* add docs */ y", "add docs"}, + {"html_comment", "<!-- fix --> code", "fix"}, + {"slash_slash", "code // please refactor", "please refactor"}, + {"hash", "# summarize", "summarize"}, + {"double_dash", "-- rewrite quickly", "rewrite quickly"}, + } + for _, c := range cases { + instr, _, ok := findFirstInstructionInLine(c.line) + if !ok || instr != c.instr { + t.Fatalf("%s: got %q ok=%v", c.name, instr, ok) + } + } } |
