Update test baselines

This commit is contained in:
Andrew Casey
2018-01-17 15:18:54 -08:00
parent b4a382bdd2
commit db3f7c538e
111 changed files with 424 additions and 424 deletions
@@ -11,12 +11,12 @@ public testMethod( )
}`);
// We're missing scenarios of formatting option settings due to bug 693273 - [TypeScript] Need to improve fourslash support for formatting options.
// Missing scenario ** Uncheck Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste **
//verify.currentFileContentIs("module TestModule {\r\n\
// class TestClass{\r\n\
//private foo;\r\n\
//public testMethod( )\r\n\
//{}\r\n\
//}\r\n\
//verify.currentFileContentIs("module TestModule {\n\
// class TestClass{\n\
//private foo;\n\
//public testMethod( )\n\
//{}\n\
//}\n\
//}");
// Missing scenario ** Check Tools->Options->Text Editor->TypeScript->Formatting->General->Format on paste **
verify.currentFileContentIs(`module TestModule {
@@ -12,6 +12,6 @@
verify.quickInfoAt("className", "class Sphere");
goTo.marker('interfaceGoesHere');
edit.insert("\r\ninterface Surface {\r\n reflect: () => number;\r\n}\r\n");
edit.insert("\ninterface Surface {\n reflect: () => number;\n}\n");
verify.quickInfoAt("className", "class Sphere");
@@ -11,7 +11,7 @@ verify.codeFix({
index: 0,
// TODO: GH#18445
newFileContent: `class C {
foo: number;\r
foo: number;
method() {
this.foo = 10;
}
@@ -11,7 +11,7 @@ verify.codeFix({
index: 1,
// TODO: GH#18445
newFileContent: `class C {
[x: string]: number;\r
[x: string]: number;
method() {
this.foo = 10;
}
@@ -11,7 +11,7 @@ verify.codeFix({
index: 0,
// TODO: GH#18445
newFileContent: `class C {
static foo: number;\r
static foo: number;
static method() {
this.foo = 10;
}
@@ -17,8 +17,8 @@ verify.codeFix({
index: 0,
// TODO: GH#18445
newFileContent: `class C {
constructor() {\r
this.foo = undefined;\r
constructor() {
this.foo = undefined;
}
method() {
this.foo === 10;
@@ -18,7 +18,7 @@ verify.codeFix({
static method() {
()=>{ this.foo === 10 };
}
}\r
C.foo = undefined;\r
}
C.foo = undefined;
`
});
@@ -15,8 +15,8 @@ verify.codeFix({
index: 0,
// TODO: GH#18445
newFileContent: `class C {
constructor() {\r
this.foo = undefined;\r
constructor() {
this.foo = undefined;
}
prop = ()=>{ this.foo === 10 };
}`
@@ -14,7 +14,7 @@ verify.codeFix({
// TODO: GH#18445
newFileContent: `class C {
static p = ()=>{ this.foo === 10 };
}\r
C.foo = undefined;\r
}
C.foo = undefined;
`
});
@@ -13,10 +13,10 @@ verify.codeFixAll({
newFileContent:
// TODO: GH#18445
`class C {
x: number;\r
y(): any {\r
throw new Error("Method not implemented.");\r
}\r
x: number;
y(): any {
throw new Error("Method not implemented.");
}
method() {
this.x = 0;
this.y();
@@ -18,11 +18,11 @@ verify.codeFixAll({
newFileContent:
// TODO: GH#18445
`class C {
y() {\r
throw new Error("Method not implemented.");\r
}\r
constructor() {\r
this.x = undefined;\r
y() {
throw new Error("Method not implemented.");
}
constructor() {
this.x = undefined;
}
method() {
this.x;
@@ -12,9 +12,9 @@ verify.codeFix({
`class A {
f() {}
}
let B = class implements A {\r
f(): void {\r
throw new Error("Method not implemented.");\r
}\r
let B = class implements A {
f(): void {
throw new Error("Method not implemented.");
}
}`
});
@@ -20,7 +20,7 @@ verify.codeFix({
return C;
}
let B = class extends foo("s")<number> {\r
a: string | number;\r
let B = class extends foo("s")<number> {
a: string | number;
}`
});
@@ -20,7 +20,7 @@ verify.codeFix({
return C;
}
class B extends foo("s")<number> {\r
a: string | number;\r
class B extends foo("s")<number> {
a: string | number;
}`
});
@@ -42,13 +42,13 @@ verify.codeFix({
// Don't need to add anything in this case.
abstract class B extends A {}
class C extends A {\r
a: string | number;\r
b: this;\r
c: A;\r
d: string | number;\r
e: this;\r
f: A;\r
g: string;\r
class C extends A {
a: string | number;
b: this;
c: A;
d: string | number;
e: this;
f: A;
g: string;
}`
});
@@ -22,16 +22,16 @@ verify.codeFix({
abstract foo(): number;
}
class C extends A {\r
f(a: number, b: string): boolean;\r
f(a: number, b: string): this;\r
f(a: string, b: number): Function;\r
f(a: string): Function;\r
f(a: any, b?: any) {\r
throw new Error("Method not implemented.");\r
}\r
foo(): number {\r
throw new Error("Method not implemented.");\r
}\r
class C extends A {
f(a: number, b: string): boolean;
f(a: number, b: string): this;
f(a: string, b: number): Function;
f(a: string): Function;
f(a: any, b?: any) {
throw new Error("Method not implemented.");
}
foo(): number {
throw new Error("Method not implemented.");
}
}`
});
@@ -14,9 +14,9 @@ verify.codeFix({
abstract f(): this;
}
class C extends A {\r
f(): this {\r
throw new Error("Method not implemented.");\r
}\r
class C extends A {
f(): this {
throw new Error("Method not implemented.");
}
}`
});
@@ -14,9 +14,9 @@ verify.codeFix({
abstract f(x: T): T;
}
class C extends A<number> {\r
f(x: number): number {\r
throw new Error("Method not implemented.");\r
}\r
class C extends A<number> {
f(x: number): number {
throw new Error("Method not implemented.");
}
}`
});
@@ -14,9 +14,9 @@ verify.codeFix({
abstract f(x: T): T;
}
class C<U> extends A<U> {\r
f(x: U): U {\r
throw new Error("Method not implemented.");\r
}\r
class C<U> extends A<U> {
f(x: U): U {
throw new Error("Method not implemented.");
}
}`
});
@@ -13,14 +13,14 @@ verify.codeFixAll({
`abstract class A {
abstract m(): void;
}
class B extends A {\r
m(): void {\r
throw new Error("Method not implemented.");\r
}\r
class B extends A {
m(): void {
throw new Error("Method not implemented.");
}
}
class C extends A {\r
m(): void {\r
throw new Error("Method not implemented.");\r
}\r
class C extends A {
m(): void {
throw new Error("Method not implemented.");
}
}`,
});
@@ -18,9 +18,9 @@ verify.codeFix({
abstract z: A;
}
class C extends A {\r
x: number;\r
y: this;\r
z: A;\r
class C extends A {
x: number;
y: this;
z: A;
}`
});
@@ -14,7 +14,7 @@ verify.codeFix({
abstract x: this;
}
class C extends A {\r
x: this;\r
class C extends A {
x: this;
}`,
});
@@ -14,7 +14,7 @@ verify.codeFix({
protected abstract x: number;
}
class C extends A {\r
protected x: number;\r
class C extends A {
protected x: number;
}`,
});
@@ -14,7 +14,7 @@ verify.codeFix({
public abstract x: number;
}
class C extends A {\r
public x: number;\r
class C extends A {
public x: number;
}`,
});
@@ -28,9 +28,9 @@ verify.codeFix({
abstract set c(arg: number | string);
}
class C implements A {\r
a: string;\r
b: number;\r
c: string | number;\r
class C implements A {
a: string;
b: number;
c: string | number;
}`,
});
@@ -14,9 +14,9 @@ verify.codeFix({
f() {}
}
class B implements A {\r
f(): void {\r
throw new Error("Method not implemented.");\r
}\r
class B implements A {
f(): void {
throw new Error("Method not implemented.");
}
}`,
});
@@ -14,10 +14,10 @@ verify.codeFix({
method(a: number, b: string): boolean;
method(a: string | number, b?: string | number): boolean | Function { return true; }
}
class C implements A {\r
method(a: number, b: string): boolean;\r
method(a: string | number, b?: string | number): boolean | Function {\r
throw new Error("Method not implemented.");\r
}\r
class C implements A {
method(a: number, b: string): boolean;
method(a: string | number, b?: string | number): boolean | Function {
throw new Error("Method not implemented.");
}
}`,
});
@@ -18,12 +18,12 @@ verify.codeFix({
method(a: string): Function;
method(a: string | number, b?: string | number): boolean | Function { return true; }
}
class C implements A {\r
method(a: any, b: string): boolean;\r
method(a: string, b: number): Function;\r
method(a: string): Function;\r
method(a: string | number, b?: string | number): boolean | Function {\r
throw new Error("Method not implemented.");\r
}\r
class C implements A {
method(a: any, b: string): boolean;
method(a: string, b: number): Function;
method(a: string): Function;
method(a: string | number, b?: string | number): boolean | Function {
throw new Error("Method not implemented.");
}
}`,
});
@@ -20,9 +20,9 @@ verify.codeFix({
public w: number;
}
class C implements A {\r
x: number;\r
protected z: number;\r
public w: number;\r
class C implements A {
x: number;
protected z: number;
public w: number;
}`,
});
@@ -12,7 +12,7 @@ verify.codeFix({
`class A {
A: typeof A;
}
class D implements A {\r
A: typeof A;\r
class D implements A {
A: typeof A;
}`,
});
@@ -75,12 +75,12 @@ class C4 extends C3 implements I0, I4, I5 {
}
interface I6 extends C4 {}
class C5 implements I6 {\r
e: number;\r
f: number;\r
a: number;\r
b: number;\r
d: number;\r
c: number;\r
class C5 implements I6 {
e: number;
f: number;
a: number;
b: number;
d: number;
c: number;
}`,
});
@@ -8,7 +8,7 @@ verify.codeFix({
// TODO: GH#18445
newFileContent:
`interface I { x: number; }
export default class implements I {\r
x: number;\r
export default class implements I {
x: number;
}`,
});
@@ -18,9 +18,9 @@ verify.codeFix({
z: [number, string, I];
}
class C implements I {\r
x: number[];\r
y: number[];\r
z: [number, string, I];\r
class C implements I {
x: number[];
y: number[];
z: [number, string, I];
}`,
});
@@ -9,7 +9,7 @@ verify.codeFix({
// TODO: GH#18445
newFileContent:
`interface I { x: number; }
new class implements I {\r
x: number;\r
new class implements I {
x: number;
};`,
});
@@ -36,11 +36,11 @@ verify.codeFix({
/**method signature prefix */foo /**open angle prefix */< /**type parameter name prefix */ X /** closing angle prefix */> /**open paren prefix */(/** parameter prefix */ a/** colon prefix */: /** parameter type prefix */ X /** close paren prefix */) /** colon prefix */: /** return type prefix */ string /** semicolon prefix */;
/**close-brace prefix*/ }
/**close-brace prefix*/ }
class C implements N.I {\r
/** property prefix */ a /** colon prefix */: N.E.a;\r
/** property prefix */ b /** colon prefix */: N.E;\r
/**method signature prefix */ foo /**open angle prefix */<X>(a: X): string {\r
throw new Error("Method not implemented.");\r
}\r
class C implements N.I {
/** property prefix */ a /** colon prefix */: N.E.a;
/** property prefix */ b /** colon prefix */: N.E;
/**method signature prefix */ foo /**open angle prefix */<X>(a: X): string {
throw new Error("Method not implemented.");
}
}`,
});
@@ -20,14 +20,14 @@ verify.codeFix({
[2]: boolean;
}
class C implements I {\r
["foo"](o: any): boolean {\r
throw new Error("Method not implemented.");\r
}\r
["x"]: boolean;\r
[1](): string {\r
throw new Error("Method not implemented.");\r
}\r
[2]: boolean;\r
class C implements I {
["foo"](o: any): boolean {
throw new Error("Method not implemented.");
}
["x"]: boolean;
[1](): string {
throw new Error("Method not implemented.");
}
[2]: boolean;
}`,
});
@@ -38,34 +38,34 @@ verify.codeFix({
[Symbol.toStringTag]: string;
[Symbol.unscopables]: any;
}
class C implements I<number> {\r
[Symbol.hasInstance](o: any): boolean {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.isConcatSpreadable]: boolean;\r
[Symbol.iterator]() {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.match]: boolean;\r
[Symbol.replace](...args: {}) {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.search](str: string): number {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.species](): number {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.split](str: string, limit?: number): {} {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.toPrimitive](hint: "number"): number;\r
[Symbol.toPrimitive](hint: "default"): number;\r
[Symbol.toPrimitive](hint: "string"): string;\r
[Symbol.toPrimitive](hint: any) {\r
throw new Error("Method not implemented.");\r
}\r
[Symbol.toStringTag]: string\;\r
[Symbol.unscopables]: any;\r
class C implements I<number> {
[Symbol.hasInstance](o: any): boolean {
throw new Error("Method not implemented.");
}
[Symbol.isConcatSpreadable]: boolean;
[Symbol.iterator]() {
throw new Error("Method not implemented.");
}
[Symbol.match]: boolean;
[Symbol.replace](...args: {}) {
throw new Error("Method not implemented.");
}
[Symbol.search](str: string): number {
throw new Error("Method not implemented.");
}
[Symbol.species](): number {
throw new Error("Method not implemented.");
}
[Symbol.split](str: string, limit?: number): {} {
throw new Error("Method not implemented.");
}
[Symbol.toPrimitive](hint: "number"): number;
[Symbol.toPrimitive](hint: "default"): number;
[Symbol.toPrimitive](hint: "string"): string;
[Symbol.toPrimitive](hint: any) {
throw new Error("Method not implemented.");
}
[Symbol.toStringTag]: string\;
[Symbol.unscopables]: any;
}`,
});
@@ -24,9 +24,9 @@ interface I1 {
f1();
}
class C1 implements N1.I1 {\r
f1(): string {\r
throw new Error("Method not implemented.");\r
}\r
class C1 implements N1.I1 {
f1(): string {
throw new Error("Method not implemented.");
}
}`,
});
@@ -17,8 +17,8 @@ verify.codeFix({
[y: string]: I;
}
class C implements I {\r
[x: number]: I;\r
[y: string]: I;\r
class C implements I {
[x: number]: I;
[y: string]: I;
}`,
});
@@ -12,7 +12,7 @@ verify.codeFix({
`interface I {
[x: number]: I;
}
class C implements I {\r
[x: number]: I;\r
class C implements I {
[x: number]: I;
}`,
});
@@ -14,7 +14,7 @@ verify.codeFix({
[Ƚ: string]: X;
}
class C implements I<number> {\r
[Ƚ: string]: number;\r
class C implements I<number> {
[Ƚ: string]: number;
}`,
});
@@ -12,7 +12,7 @@ verify.codeFix({
`interface I<X> {
x: keyof X;
}
class C<Y> implements I<Y> {\r
x: keyof Y;\r
class C<Y> implements I<Y> {
x: keyof Y;
}`,
});
@@ -16,9 +16,9 @@ abstract class C2 {
abstract fA<T extends number>();
}
interface I1 extends C1, C2 { }
class C3 implements I1 {\r
fA<T extends number>() {\r
throw new Error("Method not implemented.");\r
}\r
class C3 implements I1 {
fA<T extends number>() {
throw new Error("Method not implemented.");
}
}`,
});
@@ -12,7 +12,7 @@ verify.codeFix({
`interface I<X> {
x: { readonly [K in keyof X]: X[K] };
}
class C<Y> implements I<Y> {\r
x: { readonly [K in keyof Y]: Y[K]; };\r
class C<Y> implements I<Y> {
x: { readonly [K in keyof Y]: Y[K]; };
}`,
});
@@ -16,10 +16,10 @@ interface I {
x: Either<Either<string>>;
foo(x: Either<Either<string>>): void;
}
class C implements I {\r
x: Either<Either<string>>;\r
foo(x: Either<Either<string>>): void {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
x: Either<Either<string>>;
foo(x: Either<Either<string>>): void {
throw new Error("Method not implemented.");
}
}`,
});
@@ -62,30 +62,30 @@ interface I {
/** a nice safe prime */
23;
}
class C implements I {\r
1: any;\r
2: any;\r
3: any;\r
4: any;\r
5: any;\r
6: any;\r
7: any;\r
8: any;\r
9: any;\r
10: any;\r
11: any;\r
12: any;\r
13: any;\r
14: any;\r
15: any;\r
16: any;\r
17: any;\r
18: any;\r
19: any;\r
20: any;\r
21: any;\r
22: any;\r
/** a nice safe prime */\r
23: any;\r
class C implements I {
1: any;
2: any;
3: any;
4: any;
5: any;
6: any;
7: any;
8: any;
9: any;
10: any;
11: any;
12: any;
13: any;
14: any;
15: any;
16: any;
17: any;
18: any;
19: any;
20: any;
21: any;
22: any;
/** a nice safe prime */
23: any;
}`,
});
@@ -10,10 +10,10 @@ verify.codeFix({
newFileContent:
`type MyType = [string, number];
interface I { x: MyType; test(a: MyType): void; }
class C implements I {\r
x: [string, number];\r
test(a: [string, number]): void {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
x: [string, number];
test(a: [string, number]): void {
throw new Error("Method not implemented.");
}
}`,
});
@@ -14,9 +14,9 @@ verify.codeFix({
f(x: number, y: this): I
}
class C implements I {\r
f(x: number, y: this): I {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
f(x: number, y: this): I {
throw new Error("Method not implemented.");
}
}`,
});
@@ -16,11 +16,11 @@ verify.codeFix({
f(): this is I;
}
class C implements I {\r
f(i: any): i is I;\r
f(): this is I;\r
f(i?: any) {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
f(i: any): i is I;
f(): this is I;
f(i?: any) {
throw new Error("Method not implemented.");
}
}`,
});
@@ -24,18 +24,18 @@ verify.codeFix({
h();
}
class C1 implements I1 {\r
x: number;\r
y: number;\r
z: number;\r
f() {\r
throw new Error("Method not implemented.");\r
}\r
g() {\r
throw new Error("Method not implemented.");\r
}\r
h() {\r
throw new Error("Method not implemented.");\r
}\r
class C1 implements I1 {
x: number;
y: number;
z: number;
f() {
throw new Error("Method not implemented.");
}
g() {
throw new Error("Method not implemented.");
}
h() {
throw new Error("Method not implemented.");
}
}`,
});
@@ -18,12 +18,12 @@ verify.codeFix({
method(a: string): Function;
}
class C implements I {\r
method(a: number, b: string): boolean;\r
method(a: string, b: number): Function;\r
method(a: string): Function;\r
method(a: any, b?: any) {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
method(a: number, b: string): boolean;
method(a: string, b: number): Function;
method(a: string): Function;
method(a: any, b?: any) {
throw new Error("Method not implemented.");
}
}`,
});
@@ -18,12 +18,12 @@ verify.codeFix({
method(a: string): Function;
}
class C implements I {\r
method(a: number, ...b: string[]): boolean;\r
method(a: string, ...b: number[]): Function;\r
method(a: string): Function;\r
method(a: any, ...b?: any[]) {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
method(a: number, ...b: string[]): boolean;
method(a: string, ...b: number[]): Function;
method(a: string): Function;
method(a: any, ...b?: any[]) {
throw new Error("Method not implemented.");
}
}`,
});
@@ -18,12 +18,12 @@ verify.codeFix({
method(a: string): Function;
}
class C implements I {\r
method(a: number, ...b: string[]): boolean;\r
method(a: string, b: number): Function;\r
method(a: string): Function;\r
method(a: any, b?: any, ...rest?: any[]) {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
method(a: number, ...b: string[]): boolean;
method(a: string, b: number): Function;
method(a: string): Function;
method(a: any, b?: any, ...rest?: any[]) {
throw new Error("Method not implemented.");
}
}`,
});
@@ -18,7 +18,7 @@ verify.codeFix({
interface I1 {
f1();
}
class C1 implements N1.I1 {\r
x: number;\r
class C1 implements N1.I1 {
x: number;
}`,
});
@@ -14,8 +14,8 @@ verify.codeFix({
name: string;
birthday?: string;
}
class Person implements IPerson {\r
name: string;\r
birthday?: string;\r
class Person implements IPerson {
name: string;
birthday?: string;
}`,
});
@@ -22,10 +22,10 @@ interface I {
z: symbol;
w: object;
}
class C implements I {\r
x: E;\r
y: E.a;\r
z: symbol;\r
w: object;\r
class C implements I {
x: E;
y: E.a;
z: symbol;
w: object;
}`,
});
@@ -40,17 +40,17 @@ verify.codeFix({
a9: { (b9: number, c9: string): number; [d9: number]: I };
a10: { (b10: number, c10: string): number; [d10: string]: I };
}
class C implements I {\r
a0: {};\r
a1: (b1: number, c1: string) => number;\r
a2: (b2: number, c2: string) => number;\r
a3: { (b3: number, c3: string): number; x: number; };\r
a4: new (b1: number, c1: string) => number;\r
a5: new (b2: number, c2: string) => number;\r
a6: { new(b3: number, c3: string): number; x: number; };\r
a7: { foo(b7: number, c7: string): number; };\r
a8: { (b81: number, c81: string): number; new(b82: number, c82: string): number; };\r
a9: { (b9: number, c9: string): number;[d9: number]: I; };\r
a10: { (b10: number, c10: string): number;[d10: string]: I; };\r
class C implements I {
a0: {};
a1: (b1: number, c1: string) => number;
a2: (b2: number, c2: string) => number;
a3: { (b3: number, c3: string): number; x: number; };
a4: new (b1: number, c1: string) => number;
a5: new (b2: number, c2: string) => number;
a6: { new(b3: number, c3: string): number; x: number; };
a7: { foo(b7: number, c7: string): number; };
a8: { (b81: number, c81: string): number; new(b82: number, c82: string): number; };
a9: { (b9: number, c9: string): number;[d9: number]: I; };
a10: { (b10: number, c10: string): number;[d10: string]: I; };
}`,
});
@@ -12,7 +12,7 @@ verify.codeFix({
`namespace N {
export interface I { y: I; }
}
class C1 implements N.I {\r
y: N.I;\r
class C1 implements N.I {
y: N.I;
}`,
});
@@ -12,7 +12,7 @@ verify.codeFix({
`interface I<T> {
x: { y: T, z: T[] };
}
class C implements I<number> {\r
x: { y: number; z: number[]; };\r
class C implements I<number> {
x: { y: number; z: number[]; };
}`,
});
@@ -8,7 +8,7 @@ verify.codeFix({
// TODO: GH#18445
newFileContent:
`interface I<T> { x: T; }
class C implements I<number> {\r
x: number;\r
class C implements I<number> {
x: number;
}`
});
@@ -8,7 +8,7 @@ verify.codeFix({
// TODO: GH#18445
newFileContent:
`interface I<T> { x: T; }
class C<T> implements I<T> {\r
x: T;\r
class C<T> implements I<T> {
x: T;
}`
});
@@ -8,7 +8,7 @@ verify.codeFix({
// TODO: GH#18445
newFileContent:
`interface I<T> { x: T; }
class C<U> implements I<U> {\r
x: U;\r
class C<U> implements I<U> {
x: U;
}`
});
@@ -12,9 +12,9 @@ verify.codeFix({
`interface I {
f<T extends number>(x: T);
}
class C implements I {\r
f<T extends number>(x: T) {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I {
f<T extends number>(x: T) {
throw new Error("Method not implemented.");
}
}`,
});
@@ -11,17 +11,17 @@ verify.codeFixAll({
newFileContent:
`interface I { i(): void; }
interface J { j(): void; }
class C implements I, J {\r
i(): void {\r
throw new Error("Method not implemented.");\r
}\r
j(): void {\r
throw new Error("Method not implemented.");\r
}\r
class C implements I, J {
i(): void {
throw new Error("Method not implemented.");
}
j(): void {
throw new Error("Method not implemented.");
}
}
class D implements J {\r
j(): void {\r
throw new Error("Method not implemented.");\r
}\r
class D implements J {
j(): void {
throw new Error("Method not implemented.");
}
}`,
});
@@ -11,6 +11,6 @@
////}
// TODO: GH#18445
verify.rangeAfterCodeFix(`
super();\r
super();
this.a = 12;
`, /*includeWhiteSpace*/ true);
@@ -18,14 +18,14 @@ verify.codeFixAll({
fixId: "classSuperMustPrecedeThisAccess",
newFileContent: `class C extends Object {
constructor() {
super();\r
super();
this;
this;
}
}
class D extends Object {
constructor() {
super();\r
super();
this;
}
}`,
@@ -13,8 +13,8 @@ verify.codeFix({
`class Base{
}
class C extends Base{
constructor() {\r
super();\r
constructor() {
super();
}
}`,
});
@@ -11,13 +11,13 @@ verify.codeFixAll({
fixId: "constructorForDerivedNeedSuperCall",
// TODO: GH#18445
newFileContent: `class C extends Object {
constructor() {\r
super();\r
constructor() {
super();
}
}
class D extends Object {
constructor() {\r
super();\r
constructor() {
super();
}
}`,
});
@@ -13,8 +13,8 @@ verify.codeFixAll({
fixId: "disableJsDiagnostics",
newFileContent:
`let x = "";
// @ts-ignore\r
// @ts-ignore
x = 1;
// @ts-ignore\r
// @ts-ignore
x = true;`,
});
@@ -14,9 +14,9 @@ verify.codeFix({
index: 0,
// TODO: GH#18445
newRangeContent: `
static m1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static m1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`,
});
@@ -24,12 +24,12 @@ verify.codeFix({
description: "Declare static method 'm2'",
index: 0,
newRangeContent: `
static m2(arg0: any, arg1: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static m1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static m2(arg0: any, arg1: any): any {
throw new Error("Method not implemented.");
}
static m1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`,
});
@@ -37,13 +37,13 @@ verify.codeFix({
description: "Declare static property 'prop1'",
index: 0,
newRangeContent: `
static prop1: number;\r
static m2(arg0: any, arg1: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static m1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static prop1: number;
static m2(arg0: any, arg1: any): any {
throw new Error("Method not implemented.");
}
static m1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`,
});
@@ -51,13 +51,13 @@ verify.codeFix({
description: "Declare static property 'prop2'",
index: 0,
newRangeContent: `
static prop2: string;\r
static prop1: number;\r
static m2(arg0: any, arg1: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static m1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
static prop2: string;
static prop1: number;
static m2(arg0: any, arg1: any): any {
throw new Error("Method not implemented.");
}
static m1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`,
});
@@ -15,9 +15,9 @@ verify.codeFix({
index: 0,
// TODO: GH#18445
newRangeContent: `
foo1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
foo1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`,
});
@@ -25,12 +25,12 @@ verify.codeFix({
description: "Declare method 'foo2'",
index: 0,
newRangeContent: `
foo2<T, U, V, W, X, Y, Z>(): any {\r
throw new Error("Method not implemented.");\r
}\r
foo1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
foo2<T, U, V, W, X, Y, Z>(): any {
throw new Error("Method not implemented.");
}
foo1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`
});
@@ -38,14 +38,14 @@ verify.codeFix({
description: "Declare method 'foo3'",
index: 0,
newRangeContent:`
foo3<T0, T1, T2, T3, T4, T5, T6, T7>(): any {\r
throw new Error("Method not implemented.");\r
}\r
foo2<T, U, V, W, X, Y, Z>(): any {\r
throw new Error("Method not implemented.");\r
}\r
foo1(arg0: any, arg1: any, arg2: any): any {\r
throw new Error("Method not implemented.");\r
}\r
foo3<T0, T1, T2, T3, T4, T5, T6, T7>(): any {
throw new Error("Method not implemented.");
}
foo2<T, U, V, W, X, Y, Z>(): any {
throw new Error("Method not implemented.");
}
foo1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");
}
`
});
@@ -1,6 +1,6 @@
/// <reference path='fourslash.ts'/>
////Harness.newLine = "\r"\n/**/
////Harness.newLine = ""\n/**/
goTo.marker();
verify.not.completionListIsEmpty();
@@ -19,6 +19,6 @@ verify.applyCodeActionFromCompletion("", {
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import f_o_o from "./a";
import foo from "./a";\r
import foo from "./a";
f;`,
});
@@ -23,8 +23,8 @@ verify.applyCodeActionFromCompletion("1", {
source: "/src/foo-bar",
description: `Import 'fooBar' from module "./foo-bar"`,
// TODO: GH#18445
newFileContent: `import fooBar from "./foo-bar";\r
\r
newFileContent: `import fooBar from "./foo-bar";
def
fooB`,
});
@@ -19,7 +19,7 @@ verify.applyCodeActionFromCompletion("", {
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import foo from "./a";\r
\r
newFileContent: `import foo from "./a";
f;`,
});
@@ -20,7 +20,7 @@ verify.applyCodeActionFromCompletion("", {
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import foo from "./a";\r
\r
newFileContent: `import foo from "./a";
f;`,
});
@@ -13,7 +13,7 @@ verify.applyCodeActionFromCompletion("", {
source: "m",
description: `Import 'x' from module "m"`,
// TODO: GH#18445
newFileContent: `import { x } from "m";\r
\r
newFileContent: `import { x } from "m";
`,
});
@@ -24,7 +24,7 @@ verify.applyCodeActionFromCompletion("", {
source: "/b",
description: `Import 'foo' from module "./b"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./b";\r
\r
newFileContent: `import { foo } from "./b";
fo`,
});
@@ -20,7 +20,7 @@ verify.applyCodeActionFromCompletion("", {
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";\r
\r
newFileContent: `import { foo } from "./a";
f;`,
});
@@ -30,7 +30,7 @@ verify.applyCodeActionFromCompletion("", {
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";\r
\r
newFileContent: `import { foo } from "./a";
fo`,
});
@@ -25,7 +25,7 @@ verify.applyCodeActionFromCompletion("", {
source: "/foo/lib/foo",
description: `Import 'foo' from module "./foo"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./foo";\r
\r
newFileContent: `import { foo } from "./foo";
fo`,
});
@@ -24,8 +24,8 @@ verify.applyCodeActionFromCompletion("b", {
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";\r
\r
newFileContent: `import { foo } from "./a";
const a = require("./a");
fo`,
});
@@ -41,8 +41,8 @@ verify.applyCodeActionFromCompletion("c", {
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";\r
\r
newFileContent: `import { foo } from "./a";
const a = import("./a");
fo`,
});
@@ -15,7 +15,7 @@
////});
goTo.marker("1");
edit.insert("\r\n");
edit.insert("\n");
goTo.marker("0");
// Won't-fixed: Smart indent during chained function calls
verify.indentationIs(4);
@@ -5,8 +5,8 @@
//// /*1*/
//// function foo(x: number, y: string): boolean {}
const noIndentScaffolding = "/**\r\n * \r\n * @param x\r\n * @param y\r\n */";
const oneIndentScaffolding = "/**\r\n * \r\n * @param x\r\n * @param y\r\n */";
const noIndentScaffolding = "/**\n * \n * @param x\n * @param y\n */";
const oneIndentScaffolding = "/**\n * \n * @param x\n * @param y\n */";
const noIndentOffset = 8;
const oneIndentOffset = noIndentOffset + 4;
@@ -15,6 +15,6 @@
verify.singleReferenceGroup("(property) A.foo: string");
goTo.marker("");
edit.insert("\r\n");
edit.insert("\n");
verify.singleReferenceGroup("(property) A.foo: string");
+1 -1
View File
@@ -3,6 +3,6 @@
////{}
goTo.eof();
edit.insert("\r\n");
edit.insert("\n");
goTo.bof();
verify.currentLineContentIs("{ }");
@@ -15,10 +15,10 @@
goTo.marker("1");
edit.insert("\r\n"); // edit will trigger formatting - should succeeed
edit.insert("\n"); // edit will trigger formatting - should succeeed
goTo.marker("2");
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(0);
verify.currentLineContentIs("3`;")
@@ -5,7 +5,7 @@
/////*4*/ i -= 2
/////*5*/ }/*1*/while (1 !== 1)
goTo.marker("1");
edit.insert("\r\n");
edit.insert("\n");
verify.currentLineContentIs("while (1 !== 1)");
goTo.marker("2");
verify.currentLineContentIs("do {");
@@ -7,7 +7,7 @@
/////*6*/}while(a!==b)
/////*7*/}while(a!==b)
goTo.marker("1");
edit.insert("\r\n");
edit.insert("\n");
verify.currentLineContentIs(" {");
goTo.marker("2");
verify.currentLineContentIs("do{");
@@ -8,7 +8,7 @@
////}
goTo.marker("1");
edit.insert("\r\n");
edit.insert("\n");
// We actually need to verify smart (virtual) identation here rather than actual identation. Fourslash support is required.
verify.indentationIs(8);
goTo.marker("2");
@@ -12,7 +12,7 @@ goTo.marker("1");
verify.occurrencesAtPositionCount(2);
goTo.marker("0");
edit.insert("\r\n");
edit.insert("\n");
goTo.marker("1");
verify.occurrencesAtPositionCount(2);
@@ -11,7 +11,7 @@
goTo.file("/b.ts");
// TODO:GH#18445
verify.rangeAfterCodeFix(`import { x } from "./a";\r
\r
verify.rangeAfterCodeFix(`import { x } from "./a";
export { x } from "./a";
x;`, /*includeWhiteSpace*/ true);
@@ -7,5 +7,5 @@
////};
goTo.marker("1");
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(0);
@@ -12,7 +12,7 @@ goTo.marker("1");
verify.occurrencesAtPositionCount(2);
goTo.marker("0");
edit.insert("\r\n");
edit.insert("\n");
goTo.marker("1");
verify.occurrencesAtPositionCount(2);
@@ -12,7 +12,7 @@ goTo.marker("1");
verify.occurrencesAtPositionCount(2);
goTo.marker("0");
edit.insert("\r\n");
edit.insert("\n");
goTo.marker("1");
verify.occurrencesAtPositionCount(2);
@@ -4,7 +4,7 @@
function verifyIndentationAfterNewLine(marker: string, indentation: number): void {
goTo.marker(marker);
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(indentation);
}
@@ -4,7 +4,7 @@
function verifyIndentationAfterNewLine(marker: string, indentation: number): void {
goTo.marker(marker);
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(indentation);
}
@@ -7,7 +7,7 @@
function verifyIndentationAfterNewLine(marker: string, indentation: number): void {
goTo.marker(marker);
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(indentation);
}
@@ -9,7 +9,7 @@
function verifyIndentationAfterNewLine(marker: string, indentation: number): void {
goTo.marker(marker);
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(indentation);
}
@@ -4,7 +4,7 @@
function verifyIndentationAfterNewLine(marker: string, indentation: number): void {
goTo.marker(marker);
edit.insert("\r\n");
edit.insert("\n");
verify.indentationIs(indentation);
}

Some files were not shown because too many files have changed in this diff Show More