vendor tsgo
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual referencesForOverrides"
|
||||
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestReferencesForOverrides(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `namespace FindRef3 {
|
||||
namespace SimpleClassTest {
|
||||
export class Foo {
|
||||
public /*foo*/foo(): void {
|
||||
}
|
||||
}
|
||||
export class Bar extends Foo {
|
||||
public foo(): void {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace SimpleInterfaceTest {
|
||||
export interface IFoo {
|
||||
/*ifoo*/ifoo(): void;
|
||||
}
|
||||
export interface IBar extends IFoo {
|
||||
ifoo(): void;
|
||||
}
|
||||
}
|
||||
|
||||
namespace SimpleClassInterfaceTest {
|
||||
export interface IFoo {
|
||||
/*icfoo*/icfoo(): void;
|
||||
}
|
||||
export class Bar implements IFoo {
|
||||
public icfoo(): void {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Test {
|
||||
export interface IBase {
|
||||
/*field*/field: string;
|
||||
/*method*/method(): void;
|
||||
}
|
||||
|
||||
export interface IBlah extends IBase {
|
||||
field: string;
|
||||
}
|
||||
|
||||
export interface IBlah2 extends IBlah {
|
||||
field: string;
|
||||
}
|
||||
|
||||
export interface IDerived extends IBlah2 {
|
||||
method(): void;
|
||||
}
|
||||
|
||||
export class Bar implements IDerived {
|
||||
public field: string;
|
||||
public method(): void { }
|
||||
}
|
||||
|
||||
export class BarBlah extends Bar {
|
||||
public field: string;
|
||||
}
|
||||
}
|
||||
|
||||
function test() {
|
||||
var x = new SimpleClassTest.Bar();
|
||||
x.foo();
|
||||
|
||||
var y: SimpleInterfaceTest.IBar = null;
|
||||
y.ifoo();
|
||||
|
||||
var w: SimpleClassInterfaceTest.Bar = null;
|
||||
w.icfoo();
|
||||
|
||||
var z = new Test.BarBlah();
|
||||
z.field = "";
|
||||
z.method();
|
||||
}
|
||||
}`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.VerifyBaselineFindAllReferences(t, "foo", "ifoo", "icfoo", "field", "method")
|
||||
}
|
||||
Reference in New Issue
Block a user