33 lines
882 B
Go
33 lines
882 B
Go
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash"
|
|
. "efprojects.com/kitten-ipc/kitcom/internal/tsgo/fourslash/tests/util"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/lsp/lsproto"
|
|
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/testutil"
|
|
)
|
|
|
|
func TestSignatureHelpTokenCrash2(t *testing.T) {
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `
|
|
function foo<T, U>(x: string, y: T, z: U) {
|
|
|
|
}
|
|
|
|
foo<number,number>/*1*/("hello", 123,456)
|
|
`
|
|
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
f.VerifySignatureHelp(t, &fourslash.SignatureHelpCase{
|
|
MarkerInput: "1",
|
|
Expected: nil,
|
|
Context: &lsproto.SignatureHelpContext{
|
|
IsRetrigger: false,
|
|
TriggerCharacter: PtrTo("("),
|
|
TriggerKind: lsproto.SignatureHelpTriggerKindTriggerCharacter,
|
|
},
|
|
})
|
|
}
|