Skip to content

Commit dca61ec

Browse files
committed
Add baselines with broken diffs for now
1 parent d9d6c4b commit dca61ec

File tree

39 files changed

+2427
-27
lines changed

39 files changed

+2427
-27
lines changed

internal/testutil/baseline/baseline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func getBaselineDiff(t *testing.T, actual string, fileName string) string {
5959
}
6060
var b strings.Builder
6161
if err := diff.Text("old."+fileName, "new."+fileName, expected, actual, &b); err != nil {
62-
t.Fatalf("failed to diff the actual and expected content: %v", err)
62+
return fmt.Sprintf("failed to diff the actual and expected content: %v\n", err)
6363
}
6464

6565
// Remove line numbers from unified diff headers; this avoids adding/deleting

testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).errors.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ unreachableDeclarations.ts(14,5): error TS7027: Unreachable code detected.
44
unreachableDeclarations.ts(21,17): error TS2450: Enum 'EnumA' used before its declaration.
55
unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
66
unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
7+
unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
8+
unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
79
unreachableDeclarations.ts(49,17): error TS2449: Class 'ClassA' used before its declaration.
810
unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
911
unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
@@ -16,7 +18,7 @@ unreachableDeclarations.ts(78,2): error TS7027: Unreachable code detected.
1618
unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
1719

1820

19-
==== unreachableDeclarations.ts (16 errors) ====
21+
==== unreachableDeclarations.ts (18 errors) ====
2022
function func1() {
2123
aFunc();
2224

@@ -35,10 +37,12 @@ unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only
3537

3638
enum EnumA { Value }
3739
~~~~~~~~~~~~~~~~~~~~
38-
!!! error TS7027: Unreachable code detected.
3940
~~~~~~~~~~~~~~~~~~~~
40-
!!! error TS7027: Unreachable code detected.
4141
const enum EnumB { Value }
42+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
!!! error TS7027: Unreachable code detected.
44+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45+
!!! error TS7027: Unreachable code detected.
4246
}
4347

4448
function func2() {
@@ -74,6 +78,10 @@ unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only
7478
}
7579

7680
const enum EnumB { Value }
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~
82+
!!! error TS7027: Unreachable code detected.
83+
~~~~~~~~~~~~~~~~~~~~~~~~~~
84+
!!! error TS7027: Unreachable code detected.
7785
}
7886

7987
function func4() {

testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=false).errors.txt.diff

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
unreachableDeclarations.ts(21,17): error TS2450: Enum 'EnumA' used before its declaration.
88
unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
99
+unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
10+
+unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
11+
+unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
1012
unreachableDeclarations.ts(49,17): error TS2449: Class 'ClassA' used before its declaration.
1113
unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
1214
+unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
@@ -20,20 +22,25 @@
2022

2123

2224
-==== unreachableDeclarations.ts (12 errors) ====
23-
+==== unreachableDeclarations.ts (16 errors) ====
25+
+==== unreachableDeclarations.ts (18 errors) ====
2426
function func1() {
2527
aFunc();
2628

27-
@@= skipped -31, +35 lines =@@
29+
@@= skipped -30, +36 lines =@@
30+
2831
enum EnumA { Value }
2932
~~~~~~~~~~~~~~~~~~~~
30-
!!! error TS7027: Unreachable code detected.
33+
-!!! error TS7027: Unreachable code detected.
3134
+ ~~~~~~~~~~~~~~~~~~~~
32-
+!!! error TS7027: Unreachable code detected.
3335
const enum EnumB { Value }
36+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37+
+!!! error TS7027: Unreachable code detected.
38+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39+
+!!! error TS7027: Unreachable code detected.
3440
}
3541

36-
@@= skipped -20, +22 lines =@@
42+
function func2() {
43+
@@= skipped -21, +25 lines =@@
3744
enum EnumA { Value }
3845
~~~~~~~~~~~~~~~~~~~~
3946
!!! error TS7027: Unreachable code detected.
@@ -42,7 +49,18 @@
4249
}
4350

4451
function func3() {
45-
@@= skipped -33, +35 lines =@@
52+
@@= skipped -14, +16 lines =@@
53+
}
54+
55+
const enum EnumB { Value }
56+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
57+
+!!! error TS7027: Unreachable code detected.
58+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
59+
+!!! error TS7027: Unreachable code detected.
60+
}
61+
62+
function func4() {
63+
@@= skipped -19, +23 lines =@@
4664
class ClassA { static Value = 1234; }
4765
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4866
!!! error TS7027: Unreachable code detected.

testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).errors.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ unreachableDeclarations.ts(14,5): error TS7027: Unreachable code detected.
44
unreachableDeclarations.ts(21,17): error TS2450: Enum 'EnumA' used before its declaration.
55
unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
66
unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
7+
unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
8+
unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
79
unreachableDeclarations.ts(49,17): error TS2449: Class 'ClassA' used before its declaration.
810
unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
911
unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
@@ -16,7 +18,7 @@ unreachableDeclarations.ts(78,2): error TS7027: Unreachable code detected.
1618
unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module.
1719

1820

19-
==== unreachableDeclarations.ts (16 errors) ====
21+
==== unreachableDeclarations.ts (18 errors) ====
2022
function func1() {
2123
aFunc();
2224

@@ -35,10 +37,12 @@ unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only
3537

3638
enum EnumA { Value }
3739
~~~~~~~~~~~~~~~~~~~~
38-
!!! error TS7027: Unreachable code detected.
3940
~~~~~~~~~~~~~~~~~~~~
40-
!!! error TS7027: Unreachable code detected.
4141
const enum EnumB { Value }
42+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
!!! error TS7027: Unreachable code detected.
44+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45+
!!! error TS7027: Unreachable code detected.
4246
}
4347

4448
function func2() {
@@ -74,6 +78,10 @@ unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only
7478
}
7579

7680
const enum EnumB { Value }
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~
82+
!!! error TS7027: Unreachable code detected.
83+
~~~~~~~~~~~~~~~~~~~~~~~~~~
84+
!!! error TS7027: Unreachable code detected.
7785
}
7886

7987
function func4() {

testdata/baselines/reference/submodule/compiler/unreachableDeclarations(preserveconstenums=true).errors.txt.diff

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
+unreachableDeclarations.ts(14,5): error TS7027: Unreachable code detected.
77
unreachableDeclarations.ts(21,17): error TS2450: Enum 'EnumA' used before its declaration.
88
unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
9-
-unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
109
+unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected.
10+
unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
11+
+unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected.
1112
unreachableDeclarations.ts(49,17): error TS2449: Class 'ClassA' used before its declaration.
1213
unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
1314
+unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected.
@@ -21,24 +22,24 @@
2122

2223

2324
-==== unreachableDeclarations.ts (13 errors) ====
24-
+==== unreachableDeclarations.ts (16 errors) ====
25+
+==== unreachableDeclarations.ts (18 errors) ====
2526
function func1() {
2627
aFunc();
2728

28-
@@= skipped -31, +34 lines =@@
29+
@@= skipped -31, +36 lines =@@
2930

3031
enum EnumA { Value }
3132
~~~~~~~~~~~~~~~~~~~~
32-
- const enum EnumB { Value }
33-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34-
!!! error TS7027: Unreachable code detected.
3533
+ ~~~~~~~~~~~~~~~~~~~~
34+
const enum EnumB { Value }
35+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+
!!! error TS7027: Unreachable code detected.
37+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3638
+!!! error TS7027: Unreachable code detected.
37-
+ const enum EnumB { Value }
3839
}
3940

4041
function func2() {
41-
@@= skipped -22, +23 lines =@@
42+
@@= skipped -22, +25 lines =@@
4243
enum EnumA { Value }
4344
~~~~~~~~~~~~~~~~~~~~
4445
!!! error TS7027: Unreachable code detected.
@@ -47,16 +48,16 @@
4748
}
4849

4950
function func3() {
50-
@@= skipped -14, +16 lines =@@
51-
}
52-
51+
@@= skipped -16, +18 lines =@@
5352
const enum EnumB { Value }
54-
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
55-
-!!! error TS7027: Unreachable code detected.
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
!!! error TS7027: Unreachable code detected.
55+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
56+
+!!! error TS7027: Unreachable code detected.
5657
}
5758

5859
function func4() {
59-
@@= skipped -21, +19 lines =@@
60+
@@= skipped -19, +21 lines =@@
6061
class ClassA { static Value = 1234; }
6162
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6263
!!! error TS7027: Unreachable code detected.

testdata/baselines/reference/submodule/conformance/emitArrowFunctionThisCapturing.errors.txt

Lines changed: 20 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
failed to diff the actual and expected content: bufio.Scanner: token too long

testdata/baselines/reference/submodule/conformance/enumErrors.errors.txt

Lines changed: 131 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
failed to diff the actual and expected content: bufio.Scanner: token too long

testdata/baselines/reference/submodule/conformance/fixSignatureCaching.errors.txt

Lines changed: 1172 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)