vendor tsgo
This commit is contained in:
59
tools/tsgo/internal/fourslash/tests/gen/navbar01_test.go
Normal file
59
tools/tsgo/internal/fourslash/tests/gen/navbar01_test.go
Normal file
@@ -0,0 +1,59 @@
|
||||
// Code generated by convertFourslash; DO NOT EDIT.
|
||||
// To modify this test, run "npm run makemanual navbar01"
|
||||
|
||||
package fourslash_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/microsoft/typescript-go/internal/fourslash"
|
||||
"github.com/microsoft/typescript-go/internal/testutil"
|
||||
)
|
||||
|
||||
func TestNavbar01(t *testing.T) {
|
||||
fourslash.SkipIfFailing(t)
|
||||
t.Parallel()
|
||||
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
||||
const content = `// @lib: es5
|
||||
// Interface
|
||||
interface IPoint {
|
||||
getDist(): number;
|
||||
new(): IPoint;
|
||||
(): any;
|
||||
[x:string]: number;
|
||||
prop: string;
|
||||
}
|
||||
|
||||
/// Module
|
||||
namespace Shapes {
|
||||
// Class
|
||||
export class Point implements IPoint {
|
||||
constructor (public x: number, public y: number) { }
|
||||
|
||||
// Instance member
|
||||
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
|
||||
|
||||
// Getter
|
||||
get value(): number { return 0; }
|
||||
|
||||
// Setter
|
||||
set value(newValue: number) { return; }
|
||||
|
||||
// Static member
|
||||
static origin = new Point(0, 0);
|
||||
|
||||
// Static method
|
||||
private static getOrigin() { return Point.origin;}
|
||||
}
|
||||
|
||||
enum Values { value1, value2, value3 }
|
||||
}
|
||||
|
||||
// Local variables
|
||||
var p: IPoint = new Shapes.Point(3, 4);
|
||||
var dist = p.getDist();`
|
||||
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
||||
defer done()
|
||||
f.MarkTestAsStradaServer()
|
||||
f.VerifyBaselineDocumentSymbol(t)
|
||||
}
|
||||
Reference in New Issue
Block a user