mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
85 lines
1.8 KiB
Go
85 lines
1.8 KiB
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual completionListOfSplitInterface"
|
|
|
|
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 TestCompletionListOfSplitInterface(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `interface A {
|
|
a: number;
|
|
}
|
|
interface I extends A {
|
|
i1: number;
|
|
}
|
|
interface I1 extends A {
|
|
i11: number;
|
|
}
|
|
interface B {
|
|
b: number;
|
|
}
|
|
interface B1 {
|
|
b1: number;
|
|
}
|
|
interface I extends B {
|
|
i2: number;
|
|
}
|
|
interface I1 extends B, B1 {
|
|
i12: number;
|
|
}
|
|
interface C {
|
|
c: number;
|
|
}
|
|
interface I extends C {
|
|
i3: number;
|
|
}
|
|
var ci: I;
|
|
ci./*1*/b;
|
|
var ci1: I1;
|
|
ci1./*2*/b;`
|
|
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{
|
|
"i1",
|
|
"i2",
|
|
"i3",
|
|
"a",
|
|
"b",
|
|
"c",
|
|
},
|
|
},
|
|
})
|
|
f.VerifyCompletions(t, "2", &fourslash.CompletionsExpectedList{
|
|
IsIncomplete: false,
|
|
ItemDefaults: &fourslash.CompletionsExpectedItemDefaults{
|
|
CommitCharacters: &DefaultCommitCharacters,
|
|
EditRange: Ignored,
|
|
},
|
|
Items: &fourslash.CompletionsExpectedItems{
|
|
Unsorted: []fourslash.CompletionsExpectedItem{
|
|
"i11",
|
|
"i12",
|
|
"a",
|
|
"b",
|
|
"b1",
|
|
},
|
|
},
|
|
})
|
|
}
|