30 lines
810 B
Go
30 lines
810 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual findAllRefsConstructorFunctions"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestFindAllRefsConstructorFunctions(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `// @allowJs: true
|
|
// @Filename: /a.js
|
|
function f() {
|
|
/*1*/this./*2*/x = 0;
|
|
}
|
|
f.prototype.setX = function() {
|
|
/*3*/this./*4*/x = 1;
|
|
}
|
|
f.prototype.useX = function() { this./*5*/x; }`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
f.VerifyBaselineFindAllReferences(t, "1", "2", "3", "4", "5")
|
|
}
|