kittenipc/kitcom/internal/tsgo/fourslash/tests/gen/getOccurrencesDeclare3_test.go
2025-10-15 10:12:44 +03:00

78 lines
1.8 KiB
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/testutil"
)
func TestGetOccurrencesDeclare3(t *testing.T) {
t.Parallel()
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
const content = `
[|declare|] var x;
export [|declare|] var y, z;
module m {
export class C1 {
public pub1;
public pub2;
private priv1;
private priv2;
protected prot1;
protected prot2;
public public;
private private;
protected protected;
public constructor(public a, private b, protected c, public d, private e, protected f) {
this.public = 10;
this.private = 10;
this.protected = 10;
}
public get x() { return 10; }
public set x(value) { }
public static statPub;
private static statPriv;
protected static statProt;
}
export interface I1 {
}
export declare module ma.m1.m2.m3 {
interface I2 {
}
}
export module mb.m1.m2.m3 {
declare var foo;
export class C2 {
public pub1;
private priv1;
protected prot1;
protected constructor(public public, protected protected, private private) {
}
}
}
declare var ambientThing: number;
export var exportedThing = 10;
declare function foo(): string;
}
[|declare|] export var v1, v2;
[|declare|] module dm { }
export class EC { }`
f := fourslash.NewFourslash(t, nil /*capabilities*/, content)
f.VerifyBaselineDocumentHighlights(t, nil /*preferences*/, ToAny(f.Ranges())...)
}