mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
92 lines
2.4 KiB
Go
92 lines
2.4 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual completionListInObjectBindingPattern15"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
. "github.com/microsoft/typescript-go/internal/fourslash/tests/util"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestCompletionListInObjectBindingPattern15(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `class Foo {
|
|
private xxx1 = 1;
|
|
protected xxx2 = 2;
|
|
public xxx3 = 3;
|
|
private static xxx4 = 4;
|
|
protected static xxx5 = 5;
|
|
public static xxx6 = 6;
|
|
foo() {
|
|
const { /*1*/ } = this;
|
|
const { /*2*/ } = Foo;
|
|
}
|
|
}
|
|
|
|
const { /*3*/ } = new Foo();
|
|
const { /*4*/ } = Foo;`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyCompletions(t, "1", &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Unsorted: []fourslash.CompletionsExpectedItem{
|
|
"xxx1",
|
|
"xxx2",
|
|
"xxx3",
|
|
"foo",
|
|
},
|
|
},
|
|
})
|
|
f.VerifyCompletions(t, "2", &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Unsorted: []fourslash.CompletionsExpectedItem{
|
|
"prototype",
|
|
"xxx4",
|
|
"xxx5",
|
|
"xxx6",
|
|
},
|
|
},
|
|
})
|
|
f.VerifyCompletions(t, "3", &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Unsorted: []fourslash.CompletionsExpectedItem{
|
|
"xxx3",
|
|
"foo",
|
|
},
|
|
},
|
|
})
|
|
f.VerifyCompletions(t, "4", &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Unsorted: []fourslash.CompletionsExpectedItem{
|
|
"prototype",
|
|
"xxx6",
|
|
},
|
|
},
|
|
})
|
|
}
|