package fourslash_test

import (
	"testing"

	"github.com/microsoft/typescript-go/internal/fourslash"
	"github.com/microsoft/typescript-go/internal/lsp/lsproto"
	"github.com/microsoft/typescript-go/internal/testutil"
)

func TestSignatureHelpCommentsClassVS(t *testing.T) {
	t.Parallel()
	defer testutil.RecoverAndFail(t, "Panic on fourslash test")
	const content = `/** This is class c2 without constructor*/
class c2 {
}
var i2 = new c2(/*3*/);
var i2_c = c2;
class c3 {
    /** Constructor comment*/
    constructor() {
    }
}
var i3 = new c3(/*8*/);
var i3_c = c3;
/** Class comment*/
class c4 {
    /** Constructor comment*/
    constructor() {
    }
}
var i4 = new c4(/*13*/);
var i4_c = c4;
/** Class with statics*/
class c5 {
    static s1: number;
}
var i5 = new c5(/*18*/);
var i5_c = c5;
/** class with statics and constructor*/
class c6 {
    /** s1 comment*/
    static s1: number;
    /** constructor comment*/
    constructor() {
    }
}
var i6 = new c6(/*23*/);
var i6_c = c6;

class a {
    /**
    constructor for a
    @param a this is my a
    */
    constructor(a: string) {
    }
}
new a(/*27*/"Hello");
namespace m {
    export namespace m2 {
        /** class comment */
        export class c1 {
            /** constructor comment*/
            constructor() {
            }
        }
    }
}
var myVar = new m.m2.c1();`
	f, done := fourslash.NewFourslash(t, &lsproto.ClientCapabilities{VSSupportsVisualStudioExtensions: new(true)}, content)
	defer done()
	f.VerifyBaselineSignatureHelp(t)
}
