vendor tsgo
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual goToDefinitionClassConstructors"
|
||||
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestGoToDefinitionClassConstructors(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `// @filename: definitions.ts
|
||||
export class Base {
|
||||
constructor(protected readonly cArg: string) {}
|
||||
}
|
||||
|
||||
export class Derived extends Base {
|
||||
readonly email = this.cArg.getByLabel('Email')
|
||||
readonly password = this.cArg.getByLabel('Password')
|
||||
}
|
||||
// @filename: main.ts
|
||||
import { Derived } from './definitions'
|
||||
const derived = new [|/*Derived*/Derived|](cArg)
|
||||
// @filename: defInSameFile.ts
|
||||
import { Base } from './definitions'
|
||||
class SameFile extends Base {
|
||||
readonly name: string = 'SameFile'
|
||||
}
|
||||
const SameFile = new [|/*SameFile*/SameFile|](cArg)
|
||||
const wrapper = new [|/*Base*/Base|](cArg)
|
||||
// @filename: hasConstructor.ts
|
||||
import { Base } from './definitions'
|
||||
class HasConstructor extends Base {
|
||||
constructor() {}
|
||||
readonly name: string = '';
|
||||
}
|
||||
const hasConstructor = new [|/*HasConstructor*/HasConstructor|](cArg)`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.VerifyBaselineGoToDefinition(t, true, "Derived", "SameFile", "HasConstructor", "Base")
|
||||
}
|
||||
Reference in New Issue
Block a user