Skip to content

Commit c0acaa2

Browse files
committed
Add original file to baselines for easier diagnosing issues with baseline
1 parent 89e4a66 commit c0acaa2

File tree

69 files changed

+1705
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1705
-7
lines changed

tests/baselines/Abstracts.baseline.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
original file
2+
-----------------------------------
3+
^^abstract class Animal {
4+
public age: number;
5+
public yearsLeft() { return 20 - this.age; }
6+
^^abstract makeSound(): string;
7+
}
8+
9+
class Cow extends Animal {
10+
makeSound() { return "Moo"; }
11+
}
12+
13+
class Cat extends Animal {
14+
makeSound() { return "Meow"; }
15+
}
16+
17+
let cow = new Cow();
18+
cow.makeSound();
19+
-----------------------------------
20+
121
>abstract class Animal {
222
^^^^^^^^
323
source.ts meta.declaration.object.ts storage.modifier.ts

tests/baselines/Abstracts.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1+
original file
2+
-----------------------------------
3+
^^abstract class Animal {
4+
public age: number;
5+
public yearsLeft() { return 20 - this.age; }
6+
^^abstract makeSound(): string;
7+
}
8+
9+
class Cow extends Animal {
10+
makeSound() { return "Moo"; }
11+
}
12+
13+
class Cat extends Animal {
14+
makeSound() { return "Meow"; }
15+
}
16+
17+
let cow = new Cow();
18+
cow.makeSound();
19+
-----------------------------------
20+
121
[1, 1]: source.ts meta.declaration.object.ts storage.modifier.ts
2-
[4, 4]: source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts storage.modifier.ts
22+
[4, 4]: source.ts meta.declaration.object.ts meta.object.body.ts meta.method.declaration.ts storage.modifier.ts

tests/baselines/ArrowFunctionInsideTypeAssertion.baseline.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
original file
2+
-----------------------------------
3+
// Issue: https://github.com/Microsoft/TypeScript-Sublime-Plugin/issues/292
4+
5+
var object = {
6+
setTransform: ^^<^^(^^domNode: ^^HTMLElement, ^^desiredValue: ^^string) ^^=> ^^void>^^null,
7+
setDisplay: (domNode: HTMLElement, desiredValue: string) => {
8+
if (domNode.style.display !== desiredValue) {
9+
domNode.style.display = desiredValue;
10+
}
11+
}
12+
}
13+
14+
function f(x: string | ((value: string) => number)) {
15+
if (typeof x === "string") {
16+
return +x
17+
}
18+
else {
19+
let f = ^^<^^(^^v: ^^string) ^^=> ^^number^^> ^^x
20+
return f("hello world")
21+
}
22+
}
23+
24+
25+
-----------------------------------
26+
127
>// Issue: https://github.com/Microsoft/TypeScript-Sublime-Plugin/issues/292
228
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
329
source.ts comment.line.ts

tests/baselines/ArrowFunctionInsideTypeAssertion.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
original file
2+
-----------------------------------
3+
// Issue: https://github.com/Microsoft/TypeScript-Sublime-Plugin/issues/292
4+
5+
var object = {
6+
setTransform: ^^<^^(^^domNode: ^^HTMLElement, ^^desiredValue: ^^string) ^^=> ^^void>^^null,
7+
setDisplay: (domNode: HTMLElement, desiredValue: string) => {
8+
if (domNode.style.display !== desiredValue) {
9+
domNode.style.display = desiredValue;
10+
}
11+
}
12+
}
13+
14+
function f(x: string | ((value: string) => number)) {
15+
if (typeof x === "string") {
16+
return +x
17+
}
18+
else {
19+
let f = ^^<^^(^^v: ^^string) ^^=> ^^number^^> ^^x
20+
return f("hello world")
21+
}
22+
}
23+
24+
25+
-----------------------------------
26+
127
[4, 19]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts meta.object.member.ts cast.expr.ts meta.brace.angle.ts
228
[4, 20]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts meta.object.member.ts cast.expr.ts meta.type.paren.cover.ts
329
[4, 21]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.block.ts meta.object.member.ts cast.expr.ts meta.type.paren.cover.ts meta.type.name.ts

tests/baselines/Comments.baseline.txt

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
original file
2+
-----------------------------------
3+
/*
4+
Tests for comments in general.
5+
6+
Pull requests:
7+
- https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/307
8+
- https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/308
9+
*/
10+
11+
var ^^/* comment */ x: string = "yahoo";
12+
var x ^^/* comment */: string = "yahoo";
13+
var x: ^^/* comment */ string = "yahoo";
14+
var x: string ^^/* comment */ = "yahoo";
15+
var x: string = ^^/* comment */ "yahoo";
16+
var x: string = "yahoo" ^^/* comment */;
17+
var x: string = "yahoo"; ^^/* comment */
18+
19+
var ^^/* comment */ x: string = "yahoo"
20+
var x ^^/* comment */: string = "yahoo"
21+
var x: ^^/* comment */ string = "yahoo"
22+
var x: string ^^/* comment */ = "yahoo"
23+
var x: string = ^^/* comment */ "yahoo"
24+
var x: string = "yahoo" ^^/* comment */
25+
26+
^^/**/ interface i extends i1, i2, i3 {}
27+
interface ^^/**/ i extends i1, i2, i3 {}
28+
interface i ^^/**/ extends i1, i2, i3 {}
29+
interface i extends ^^/**/ i1, i2, i3 {}
30+
interface i extends i1 ^^/**/, i2, i3 {}
31+
interface i extends i1, ^^/**/ i2, i3 {}
32+
interface i extends i1, i2 ^^/**/, i3 {}
33+
interface i extends i1, i2, ^^/**/ i3 {}
34+
interface i extends i1, i2, i3 ^^/**/ {}
35+
^^/**/ interface ^^/**/ i ^^/**/ extends ^^/**/ i1, ^^/**/ i2, ^^/**/ i3 ^^/**/ {}
36+
^^/**/ interface ^^/**/ i ^^/**/ extends ^^/**/ i1 ^^/**/ , ^^/**/ i2 ^^/**/ , ^^/**/ i3 ^^/**/ {}
37+
38+
^^/**/class i extends c1,c2,c3{}
39+
class^^/**/i extends c1,c2,c3{}
40+
class i^^/**/extends c1,c2,c3{}
41+
class i extends^^/**/c1,c2,c3{}
42+
class i extends c1^^/**/,c2,c3{}
43+
class i extends c1,^^/**/c2,c3{}
44+
class i extends c1,c2^^/**/,c3{}
45+
class i extends c1,c2,^^/**/c3{}
46+
class i extends c1,c2,c3^^/**/{}
47+
^^/**/class^^/**/i^^/**/extends^^/**/c1,^^/**/c2,^^/**/c3^^/**/{}
48+
^^/**/class^^/**/i^^/**/extends^^/**/c1^^/**/,^^/**/c2^^/**/,^^/**/c3^^/**/{}
49+
50+
interface KeyValuePair^^/**/<K, V> extends Array<K | V> { 0: K; 1: V; }
51+
interface KeyValuePair<K, V>^^/**/extends Array<K | V> { 0: K; 1: V; }
52+
interface KeyValuePair<K, V> extends^^/**/Array<K | V> { 0: K; 1: V; }
53+
interface KeyValuePair<K, V> extends Array^^/**/<K | V> { 0: K; 1: V; }
54+
interface KeyValuePair<K, V> extends Array<K | V>^^/**/{ 0: K; 1: V; }
55+
56+
interface G^^/**/<extends_, _extends extends Function> {
57+
f<V extends U>(x: V): V;
58+
}
59+
interface G<extends_, _extends^^/**/extends Function> {
60+
f<V extends U>(x: V): V;
61+
}
62+
interface G<extends_, _extends extends^^/**/Function> {
63+
f<V extends U>(x: V): V;
64+
}
65+
66+
var x^^/*comments*/=new String();
67+
var x=^^/*comments*/new String();
68+
var x= new^^/*comments*/String();
69+
70+
var x ^^/* comments */ = new String();
71+
var x = ^^/* comments */ new String();
72+
var x = new ^^/* comments */ String();
73+
-----------------------------------
74+
175
>/*
276
^^
377
source.ts comment.block.ts

tests/baselines/Comments.txt

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
original file
2+
-----------------------------------
3+
/*
4+
Tests for comments in general.
5+
6+
Pull requests:
7+
- https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/307
8+
- https://github.com/Microsoft/TypeScript-Sublime-Plugin/pull/308
9+
*/
10+
11+
var ^^/* comment */ x: string = "yahoo";
12+
var x ^^/* comment */: string = "yahoo";
13+
var x: ^^/* comment */ string = "yahoo";
14+
var x: string ^^/* comment */ = "yahoo";
15+
var x: string = ^^/* comment */ "yahoo";
16+
var x: string = "yahoo" ^^/* comment */;
17+
var x: string = "yahoo"; ^^/* comment */
18+
19+
var ^^/* comment */ x: string = "yahoo"
20+
var x ^^/* comment */: string = "yahoo"
21+
var x: ^^/* comment */ string = "yahoo"
22+
var x: string ^^/* comment */ = "yahoo"
23+
var x: string = ^^/* comment */ "yahoo"
24+
var x: string = "yahoo" ^^/* comment */
25+
26+
^^/**/ interface i extends i1, i2, i3 {}
27+
interface ^^/**/ i extends i1, i2, i3 {}
28+
interface i ^^/**/ extends i1, i2, i3 {}
29+
interface i extends ^^/**/ i1, i2, i3 {}
30+
interface i extends i1 ^^/**/, i2, i3 {}
31+
interface i extends i1, ^^/**/ i2, i3 {}
32+
interface i extends i1, i2 ^^/**/, i3 {}
33+
interface i extends i1, i2, ^^/**/ i3 {}
34+
interface i extends i1, i2, i3 ^^/**/ {}
35+
^^/**/ interface ^^/**/ i ^^/**/ extends ^^/**/ i1, ^^/**/ i2, ^^/**/ i3 ^^/**/ {}
36+
^^/**/ interface ^^/**/ i ^^/**/ extends ^^/**/ i1 ^^/**/ , ^^/**/ i2 ^^/**/ , ^^/**/ i3 ^^/**/ {}
37+
38+
^^/**/class i extends c1,c2,c3{}
39+
class^^/**/i extends c1,c2,c3{}
40+
class i^^/**/extends c1,c2,c3{}
41+
class i extends^^/**/c1,c2,c3{}
42+
class i extends c1^^/**/,c2,c3{}
43+
class i extends c1,^^/**/c2,c3{}
44+
class i extends c1,c2^^/**/,c3{}
45+
class i extends c1,c2,^^/**/c3{}
46+
class i extends c1,c2,c3^^/**/{}
47+
^^/**/class^^/**/i^^/**/extends^^/**/c1,^^/**/c2,^^/**/c3^^/**/{}
48+
^^/**/class^^/**/i^^/**/extends^^/**/c1^^/**/,^^/**/c2^^/**/,^^/**/c3^^/**/{}
49+
50+
interface KeyValuePair^^/**/<K, V> extends Array<K | V> { 0: K; 1: V; }
51+
interface KeyValuePair<K, V>^^/**/extends Array<K | V> { 0: K; 1: V; }
52+
interface KeyValuePair<K, V> extends^^/**/Array<K | V> { 0: K; 1: V; }
53+
interface KeyValuePair<K, V> extends Array^^/**/<K | V> { 0: K; 1: V; }
54+
interface KeyValuePair<K, V> extends Array<K | V>^^/**/{ 0: K; 1: V; }
55+
56+
interface G^^/**/<extends_, _extends extends Function> {
57+
f<V extends U>(x: V): V;
58+
}
59+
interface G<extends_, _extends^^/**/extends Function> {
60+
f<V extends U>(x: V): V;
61+
}
62+
interface G<extends_, _extends extends^^/**/Function> {
63+
f<V extends U>(x: V): V;
64+
}
65+
66+
var x^^/*comments*/=new String();
67+
var x=^^/*comments*/new String();
68+
var x= new^^/*comments*/String();
69+
70+
var x ^^/* comments */ = new String();
71+
var x = ^^/* comments */ new String();
72+
var x = new ^^/* comments */ String();
73+
-----------------------------------
74+
175
[9, 5]: source.ts meta.var.expr.ts comment.block.ts
276
[10, 7]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts comment.block.ts
377
[11, 8]: source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.type.annotation.ts comment.block.ts

tests/baselines/FunctionMethodOverloads.baseline.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
original file
2+
-----------------------------------
3+
/* Function overload tests */
4+
^^export function ^^testFunctionOverload(p: number): new() => any
5+
^^export function ^^testFunctionOverload(p: string)
6+
^^export function ^^testFunctionOverload(p: string [])
7+
^^export function ^^testFunctionOverload(p: {})
8+
^^export function ^^testFunctionOverload(p: {a: A, b:B} | string [])
9+
^^export function ^^testFunctionOverload(p: any): new() => any {
10+
^^throw new Error("")
11+
}
12+
13+
^^export function ^^testFunctionOverloadWithSemicolon(p: number): new () => any;
14+
^^export function ^^testFunctionOverloadWithSemicolon(p: string);
15+
^^export function ^^testFunctionOverloadWithSemicolon(p: string[]);
16+
^^export function ^^testFunctionOverloadWithSemicolon(p: {});
17+
^^export function ^^testFunctionOverloadWithSemicolon(p: { a: A, b: B } | string[]);
18+
^^export function ^^testFunctionOverloadWithSemicolon(p: any): new () => any {
19+
^^throw new Error("")
20+
}
21+
22+
23+
class testClass {
24+
/* Function overload tests */
25+
^^public ^^testMethodOverload(p: number): new() => any
26+
^^public ^^testMethodOverload(p: string)
27+
^^public ^^testMethodOverload(p: string [])
28+
^^public ^^testMethodOverload(p: {})
29+
^^public ^^testMethodOverload(p: {a: A, b:B} | string [])
30+
^^public ^^testMethodOverload(p: any): new() => any {
31+
^^throw new Error("")
32+
}
33+
34+
^^public ^^testMethodOverloadWithSemicolon(p: number): new () => any;
35+
^^public ^^testMethodOverloadWithSemicolon(p: string);
36+
^^public ^^testMethodOverloadWithSemicolon(p: string[]);
37+
^^public ^^testMethodOverloadWithSemicolon(p: {});
38+
^^public ^^testMethodOverloadWithSemicolon(p: { a: A, b: B } | string[]);
39+
^^public ^^testMethodOverloadWithSemicolon(p: any): new () => any {
40+
^^throw new Error("")
41+
}
42+
}
43+
44+
interface I {
45+
^^foo(): number
46+
^^bar(): string;
47+
}
48+
49+
abstract class C {
50+
^^abstract ^^foo()
51+
^^abstract ^^bar()
52+
}
53+
-----------------------------------
54+
155
>/* Function overload tests */
256
^^
357
source.ts comment.block.ts

tests/baselines/FunctionMethodOverloads.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
original file
2+
-----------------------------------
3+
/* Function overload tests */
4+
^^export function ^^testFunctionOverload(p: number): new() => any
5+
^^export function ^^testFunctionOverload(p: string)
6+
^^export function ^^testFunctionOverload(p: string [])
7+
^^export function ^^testFunctionOverload(p: {})
8+
^^export function ^^testFunctionOverload(p: {a: A, b:B} | string [])
9+
^^export function ^^testFunctionOverload(p: any): new() => any {
10+
^^throw new Error("")
11+
}
12+
13+
^^export function ^^testFunctionOverloadWithSemicolon(p: number): new () => any;
14+
^^export function ^^testFunctionOverloadWithSemicolon(p: string);
15+
^^export function ^^testFunctionOverloadWithSemicolon(p: string[]);
16+
^^export function ^^testFunctionOverloadWithSemicolon(p: {});
17+
^^export function ^^testFunctionOverloadWithSemicolon(p: { a: A, b: B } | string[]);
18+
^^export function ^^testFunctionOverloadWithSemicolon(p: any): new () => any {
19+
^^throw new Error("")
20+
}
21+
22+
23+
class testClass {
24+
/* Function overload tests */
25+
^^public ^^testMethodOverload(p: number): new() => any
26+
^^public ^^testMethodOverload(p: string)
27+
^^public ^^testMethodOverload(p: string [])
28+
^^public ^^testMethodOverload(p: {})
29+
^^public ^^testMethodOverload(p: {a: A, b:B} | string [])
30+
^^public ^^testMethodOverload(p: any): new() => any {
31+
^^throw new Error("")
32+
}
33+
34+
^^public ^^testMethodOverloadWithSemicolon(p: number): new () => any;
35+
^^public ^^testMethodOverloadWithSemicolon(p: string);
36+
^^public ^^testMethodOverloadWithSemicolon(p: string[]);
37+
^^public ^^testMethodOverloadWithSemicolon(p: {});
38+
^^public ^^testMethodOverloadWithSemicolon(p: { a: A, b: B } | string[]);
39+
^^public ^^testMethodOverloadWithSemicolon(p: any): new () => any {
40+
^^throw new Error("")
41+
}
42+
}
43+
44+
interface I {
45+
^^foo(): number
46+
^^bar(): string;
47+
}
48+
49+
abstract class C {
50+
^^abstract ^^foo()
51+
^^abstract ^^bar()
52+
}
53+
-----------------------------------
54+
155
[2, 1]: source.ts meta.function.ts storage.type.ts
256
[2, 17]: source.ts meta.function.ts entity.name.function.ts
357
[3, 1]: source.ts meta.function.ts meta.function.overload.ts storage.type.ts

0 commit comments

Comments
 (0)