Skip to content

Commit e18d2e8

Browse files
Merge pull request #130 from h-joo/updateReasons
Update diff reasons of tests
2 parents d91c282 + 901c7e3 commit e18d2e8

11 files changed

+29
-33
lines changed

tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// [[Reason: TODO: Printing differences. Seems avoidable.]] ////
1+
// [[Reason: We made this is an error, thus the auto-fixer is trying to fix it. Although it's possible syntactically to figure out that E is an enum, I think we should rather make this an error for now.]] ////
22

33
//// [tests/cases/compiler/ambientConstLiterals.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -15,9 +15,9 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -15,9 +15,9 @@
99
declare const c5: 123;
1010
declare const c6: -123;
1111
declare const c7 = true;

tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// [[Reason: TODO: Investigte. Fixer prints more levels of the type.]] ////
1+
// [[Reason: Type expansion of infinite type becomes different, but both are technically the same type]] ////
22

33
//// [tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -2,9 +2,12 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -2,9 +2,12 @@
99

1010
//// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts]
1111
export type Key<U> = keyof U;
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// [[Reason: TODO: new is not correctly emitted.]] ////
1+
// [[Reason: Source maps difference.]] ////
22

33
//// [tests/cases/compiler/emitMethodCalledNew.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,6 +1,6 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,6 +1,6 @@
99

1010
//// [emitMethodCalledNew.d.ts.map]
1111
-{"version":3,"file":"emitMethodCalledNew.d.ts","sourceRoot":"","sources":["emitMethodCalledNew.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;aACL,MAAM,GAAG,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;aACH,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;aACD,MAAM,GAAG,MAAM;CAC3B,CAAA"}
1212
+{"version":3,"file":"emitMethodCalledNew.d.ts","sourceRoot":"","sources":["emitMethodCalledNew.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;UACR,CAAC,EAAE,MAAM,GAAG,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;UACN,CAAC,EAAE,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;UACJ,CAAC,EAAE,MAAM,GAAG,MAAM;CAC3B,CAAA"}
13-
14-
-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgYTogew0KICAgICJuZXciKHg6IG51bWJlcik6IG51bWJlcjsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBiOiB7DQogICAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGM6IHsNCiAgICAibmV3Iih4OiBudW1iZXIpOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdX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ZW1pdE1ldGhvZENhbGxlZE5ldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxlQUFPLE1BQU0sQ0FBQztVQUNSLENBQUMsRUFBRSxNQUFNLEdBQUcsTUFBTTtDQUN2QixDQUFBO0FBQ0QsZUFBTyxNQUFNLENBQUM7VUFDTixDQUFDLEVBQUUsTUFBTSxHQUFHLE1BQU07Q0FDekIsQ0FBQTtBQUNELGVBQU8sTUFBTSxDQUFDO1VBQ0osQ0FBQyxFQUFFLE1BQU0sR0FBRyxNQUFNO0NBQzNCLENBQUEifQ==,Ly8gaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy81NTA3NQoKZXhwb3J0IGNvbnN0IGEgPSB7CiAgbmV3KHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0KZXhwb3J0IGNvbnN0IGIgPSB7CiAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K
1616

tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// [[Reason: TODO: Files in node modules are not fixed. Should we?]] ////
1+
// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules]] ////
22

33
//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] ////
44

5-
===================================================================
6-
--- TSC declarations
7-
+++ DTE declarations
8-
@@ -1,19 +1,4 @@
5+
===================================================================
6+
--- TSC declarations
7+
+++ DTE declarations
8+
@@ -1,19 +1,4 @@
99

1010

1111
//// [/bin/test.d.ts]
@@ -24,5 +24,5 @@
2424
- ~~~
2525
-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.
2626
-==== /node_modules/some-library/index.ts (0 errors) ====
27-
- export function base() {}
28-
\ No newline at end of file
27+
- export function base() {}
28+
\ No newline at end of file

tests/cases/compiler/ambientConstLiterals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @declaration: true
2-
// @isolatedDeclarationFixedDiffReason: TODO: Printing differences. Seems avoidable.
2+
// @isolatedDeclarationFixedDiffReason: We made this is an error, thus the auto-fixer is trying to fix it. Although it's possible syntactically to figure out that E is an enum, I think we should rather make this an error for now.
33

44
function f<T>(x: T): T {
55
return x;

tests/cases/compiler/constEnums.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @isolatedDeclarationDiffReason: TODO Add support for nested namespace access for enums
21
const enum Enum1 {
32
A0 = 100,
43
}

tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @declaration: true
22
// @lib: es6
3-
// @isolatedDeclarationFixedDiffReason: TODO: Investigte. Fixer prints more levels of the type.
3+
// @isolatedDeclarationFixedDiffReason: Type expansion of infinite type becomes different, but both are technically the same type
44

55
// Note that both of the following have an `any` in their return type from where we bottom out the type printout
66
// for having too many instances of the same symbol nesting.

tests/cases/compiler/emitMethodCalledNew.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @declaration: true
2-
// @isolatedDeclarationFixedDiffReason: TODO: new is not correctly emitted.
2+
// @isolatedDeclarationFixedDiffReason: Source maps difference.
33

44
// https://github.com/microsoft/TypeScript/issues/55075
55

tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// moduleSuffixes has one entry and there's a matching package with TS files.
2-
// @isolatedDeclarationDiffReason: TODO: Files in node modules are not fixed. Should we?
2+
// @isolatedDeclarationDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules
33
// @fullEmitPaths: true
44
// @filename: /tsconfig.json
55
{

tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// @target: es5
22
// @declaration: true
3-
// @isolatedDeclarations: false
4-
// @isolatedDeclarationDiffReason: TODO: Negative number causes issue. GH#56562
53
var v = {
64
[-1]: {},
75
[+1]: {},

tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @target: es6
22
// @declaration: true
33
// @isolatedDeclarations: false
4-
// @isolatedDeclarationDiffReason: TODO: Negative number causes issue. GH#56562
54
var v = {
65
[-1]: {},
76
[+1]: {},

0 commit comments

Comments
 (0)